Visual Basic.net

D

Dominic

Am new to programming and need a little help! I am
developing an App, and wwant a second form to open
automatically when the app is run. The second form has
options to open other areas of the app. What is the best
way to do this. Can anyone help..?
Thanks
 
A

Armin Zingler

Dominic said:
Am new to programming and need a little help! I am
developing an App, and wwant a second form to open
automatically when the app is run. The second form has
options to open other areas of the app. What is the best
way to do this. Can anyone help..?
Thanks


Class App
shared sub main
dim f1 as new form1
dim f2 as new form2

f1.show
f2.show
application.run()
end sub
end class


Select this sub main in the project properties as the startup object. This
app can be terminated by calling Application.exitthread.

If one of the forms lives from start til the end of the application, pass it
to application.Run:

application.run(f1)

In this case, you do not have to call application.exitthread. The app will
terminate as soon as f1 is closed.


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 

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

Similar Threads


Top