Reputation: 81
I am a Java programmer and don't know much about VB.
My task:
Create an exe. When I run the exe it will read a text file, and after that it will display the content. After that the application code ends.
What i have done:
I have created a project and created a button on the form. On click of the button I have given the option to read.
Problem
I am not able to find the event which has to be used to run code on start up and code to end the application when my task completes.
Please help me with the process which I have to follow. If the code is provided, it's best, but if somebody knows any web resources it will also be a great help.
Upvotes: 0
Views: 7969
Reputation: 13174
To do something at form's start up, use Form_Load()
event.
To close a form, use unload me
.
To close your application, use end
.
Hope this solves your problem. If not, you are welcome for further queries.
Upvotes: 3
Reputation: 7196
You can create a Visual Basic 6 program to run without any form.
You need to create a module. Put a Public Sub Main inside of it.
Then in under Project Properties, General Tab; change the startup object to be Sub Main.
Upvotes: 10