how solutions to the sub main that is in VB6.
because there is no facility in VB.NET?
Printable View
how solutions to the sub main that is in VB6.
because there is no facility in VB.NET?
There's almost never a need to use a Sub Main. In a VB 2008 application, the Application Framework is enabled by default. It provides a Startup event, which you can handle to perform actions before the startup form is created. It also provides a Shutdown event, which you cam handle to perform actions after the last form has closed. There are various other events and functionality available too. If you explain what you're trying to achieve then we can explain the best way to achieve it.
In the very few situations where you really need to create your own Sub Main, you need to disable the Application Framework first, which allows you to select a Startup Object instead of a Startup Form.
I want the first time he read the sub Main running play.
because in sub Main play is there some process that needs to be done.
include: open database connection, call and other.
Public Sub Main()
Call OpenDatabase()
Call APPConfig()
frmLogin.ShowDialog()
End Sub
Can give me a way to do this?
:)
If you read my previous post properly then already have it:Not that it would be hard to find others if you would care to search, but you can find an example by following the CodeBank link in my signature and checking out my WinForms Login thread.Quote:
[the application framework] provides a Startup event, which you can handle to perform actions before the startup form is created.
thank you :)