using the show command

T

Tony Johansson

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!
Is it possible to write some code which confirm that the show method is
called.


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

public FrmContainer()
{
InitializeComponent();
}


//Tony
 
T

Tony Johansson

Hello!

The answer in another thread said the following.

"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"


I redefined this Show in the following way
public new void Show()
{
...
}

I put a breakpoint on this redefined Show but there was no call to this
method

//Tony

Peter Duniho said:
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 [...]

I believe someone already answered this same question in a different
thread.

Pete
 

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