where the code should put?

  • Thread starter Thread starter Zarowich
  • Start date Start date
Z

Zarowich

Hello,

I am new in VB and also VB.Net

What event should I put the code in VB.Net if I want to
start the
application with a form (I need the benefis of form to do
all the process)
and then shut down by itself?

Thanks
Zarowich
 
Hi Zarowich,

About this will a lot of persons have different idea's, there are endless
possibilities.

To start you'r applications I use the "Load event"

If I don't need the value of a key I use with a button, menu the "Click
event"

With listboxes, comboboxes etc. which has to be filled I use
"SelectionChangeCommitted"

For Closing I use mostly Closing.

So when you only want a very short flash on your screen, you can do
everything in the Load event and end that with as last row "me.close"

Not the best approach, but it is possible.

Cor
 
* "Zarowich said:
What event should I put the code in VB.Net if I want to
start the
application with a form (I need the benefis of form to do
all the process)
and then shut down by itself?

Add this code into a new file:

\\\
Public Class AppMain
Public Shared Sub Main()

' Add custom code here.

Application.Run(New MainForm())
End Sub
End Class
///

In the project's properties dialog set 'AppMain' as startup object.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
 
Back
Top