Ending a Program Error

  • Thread starter Thread starter Travis
  • Start date Start date
T

Travis

I have encountered a problem with ending any program I build with
VB.net and was hopeing someone might have an answer.

This is a simple example of the code that will cause an error:

In a module I have:

Dim Form As New Form1

Sub main()
Application.Run(Form)
End Sub

then in the form window I simply have a button which has one word in
the click event:

End

each time I run the program it throws an error when the button is
clicked.
Help please...

Also note I have tried application.exit instead of end and get the
same error.
 

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

Back
Top