Hi salo,
hi
at visual basic 6
i write this
to the button1_cl1ck
unload form1
form2.show
then form2 shown and the form1 unload
and at form2 button
i write
unload form2
form1.show
but when i bigin to visual basic dot net i write these
codes but they are not working .
Of course not - VB.NET is not VB6. It's a different type of programming, and
everybody who wants to move to VB.NET has to learn a lot of new things.
However, I'll try to help.
In case Form1 is the first form in your Application, it won't work anyway -
since this is the main form of the program, the program ends if the form is
closed. I'm not sure what you try to do, but if you want to show a form,
close it an show another one, that's possible:
==================
Dim frm1 as new Form1()
Dim frm2 as new Form2()
frm1.Show()
' Do Something
frm1.Close()
frm2.Show()
' Do Something
frm2.Close()
===================
Just in case you try to add a SplashScreen to your app, you need to go a
different way. In that case I suggest to add a Main()-Method to the project
and set the start-object to this main()-Method. Then you can add a
SplashScreen like this:
===================
public shared sub Main(args as String())
dim splashForm as new Form2() ' Form2 must be the SplashForm ...
dim mainForm as new Form1() ' this is the main form of your app
splashForm.Show()
' Do something
splashForm.Close()
Application.Run(mainForm)
End sub
===================
Regards,