Click here to Skip to main content
15,909,332 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
See more:
how to switch between forms in c# ??

I found this video that show exactly what I want but in vb how to do the same think in c#?????

video link [^]
Posted
Comments
Sergey Alexandrovich Kryukov 29-Mar-13 20:24pm    
VB? What's the difference, in this respect? The libraries are the same. What do you mean by "switch" exactly? Hope I answered. If this is something else, please clarify.
—SA

Probably, by "switch" you mean activation, which happens when you click on the form. Programmatically, you can call:
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.activate.aspx[^].

—SA
 
Share this answer
 
I suspect your issue isnt so much as 'switching between forms' as it is 'how do I have an instance of a database so that I can access the data from 2 forms' - - so its an architectural issue

... and for that, you really need to look at 'MVC' or such, so your database isnt strongly 'tied to' one/any form but accessable from anywhere in your code

'g'
 
Share this answer
 
Comments
anamo 29-Mar-13 21:07pm    
more explanation please ?
Create a Data-Abstraction-Layer - DAL (google it) - either pass an instance of this between forms or use a static/global instance

'g'
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900