Using multiple winforms

K

kuhrty

Hi,

I have created a main menu and I would like to use this form to call
the other forms in my project. I have hit a stumbling block in regards

to closing and hiding forms.


My Main Menu form has a link and it calls another form


frmSafetyStock ssForm = new frmSafetyStock();
ssForm.Show();


this.Hide();


It opens the form properly but I get a slew of unexpected events.


If I fail the new opened form on purpose to catch the error handling,
it bypasses the error handling completely and comes back to this call
and hides the Main Menu using this.Hide();


Ideally, I want to hide this Main Menu form but if an error hits, I
would like to show the main menu. I also want this menu to be called
on the exit of the application. I don't this I should put my error
handling on this page since its only links.


Should I delete the Application.Run() and just start this window form
up as the default. Or am I going to get different issues.


Any help would be great. I am using VS C# 2003
 
S

Stoitcho Goutsev \(100\)

kuhrty,

Forgive me for saying that, but it is really hard to uderstand the problem
from this post. You should probably post some compilable sample code that
demonstrates the issue.
 

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