For Programmers: Free Programming Magazines  


Home > Archive > C# > June 2006 > Main Menu Window Form









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Main Menu Window Form
kuhrty

2006-06-27, 7:02 pm

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

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com