A simple question about show

T

Tony

Hello!

When I have only one window how can the window form be displayed
when I don't have a show method. As in the example below with the Form class
FrmContainer

If I have an MDI child I must explicitly use the Show method for the MDI
child.

Can somebody explain that!

static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrmContainer());
}

public FrmContainer()
{
InitializeComponent();
}
 
I

Ignacio Machin ( .NET/ C# MVP )

Hello!

When I have only one window how can the window form be displayed
when I don't have a show method. As in the example below with the Form class
FrmContainer

If I have an MDI child I must explicitly use the Show method for the MDI
child.

Can somebody explain that!

        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FrmContainer());
        }

        public FrmContainer()
        {
            InitializeComponent();
         }

HI,

Application.Run calls Show

do this, redefine the Show method in your form and put a breakpoint
there, take a look in the call stack and you will see the call
 
T

Tony Johansson

Hello!

How do I write to test this with show that you suggested ?

//Tony


"Ignacio Machin ( .NET/ C# MVP )" <[email protected]> skrev i
meddelandet
Hello!

When I have only one window how can the window form be displayed
when I don't have a show method. As in the example below with the Form
class
FrmContainer

If I have an MDI child I must explicitly use the Show method for the MDI
child.

Can somebody explain that!

static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FrmContainer());
}

public FrmContainer()
{
InitializeComponent();
}

HI,

Application.Run calls Show

do this, redefine the Show method in your form and put a breakpoint
there, take a look in the call stack and you will see the call
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top