Sharing forms between 2 menuitems and changing name property based on each selection using VB.Net 2003
Posted on 2006-11-28
I have a windows application (VS 2003) with a 2 menu item
Menu1 has the following submenus
Menu2 has the following submenus
Only one copy each of form1, form2 and form3 exist.
I want to be able to use the threee forms between the two submenus
so that when a user clicks on Menu1- form1 he gets this
and when a user clicks on Menu2 - form1 he still gets form1.
The name property should show where the form is been called.
I will be reading sqlconnection strings from the app.config file
and they each vary for Menu1 and Menu2(totally different)
How can I code this so that when the user clicks on Menu1 - form1,
the connectionstring from app.config is retrieved and when
user clicks on Menu2 - form1, another connection string from app.config is used.