Command to terminate execution

  • Thread starter Thread starter Tom Wells
  • Start date Start date
T

Tom Wells

I have a VB.NET program that is going to run on a server every 15 minutes.
When it finishes I end up with a blank form sitting on the screen. How do I
get it to close automatically?
 
How is the form launched? Are you starting from a Sub Main or is the form
the startup object?

This will close the form.
Form.Close()

Chris
 
Hello Chris, Master of All Things Insignificant,

Technically, everything starts from Sub Main. ;)

As you said, you can use form.Close, or the more brutal Application.Exit.
Environment.Exit also lets you bail out of an application with a return code.
 
Just a quick point. How is a winform application going to run on the
server when no one is logged in? Is a user typically logged in on the
server?

Think about using a service instead.
 
Back
Top