PC Review


Reply
Thread Tools Rate Thread

Command to terminate execution

 
 
Tom Wells
Guest
Posts: n/a
 
      17th Feb 2005
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?


 
Reply With Quote
 
 
 
 
Chris, Master of All Things Insignificant
Guest
Posts: n/a
 
      17th Feb 2005
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

"Tom Wells" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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?
>
>



 
Reply With Quote
 
Matt Berther
Guest
Posts: n/a
 
      18th Feb 2005
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.

--
Matt Berther
http://www.mattberther.com

> 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
>
> "Tom Wells" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>> 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?




 
Reply With Quote
 
Pat A
Guest
Posts: n/a
 
      18th Feb 2005
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
command to terminate a running program? A.E lover Windows XP Help 5 19th May 2008 04:31 PM
DoCmd.Close command does not terminate form code execution Drahala via AccessMonster.com Microsoft Access VBA Modules 2 1st May 2007 08:32 PM
What is the VBA command to terminate the Excel.exe process orenr Microsoft Excel Programming 3 27th Dec 2005 09:05 AM
RSH command finishes but does not terminate. Jason BArona Microsoft Windows 2000 1 14th Jan 2004 12:48 PM
How can you wait for the SHELL command to terminate ? jmoffat Microsoft Excel Programming 2 1st Oct 2003 09:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:01 PM.