Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic .NET (http://www.programmingforums.org/forum19.html)
-   -   creating a program that will auto close when done? (http://www.programmingforums.org/showthread.php?t=10785)

randum77 Jul 20th, 2006 2:23 PM

creating a program that will auto close when done?
 
I've been working with .net for a bit now and can build apps that have a bunch of buttons and require user intervention. I've also build VBScripts that run procedures and such and they don't require any user intervention, but have limited capabilities (or so it seems). In VB.net i can import classes at the begining of the code. Say for instance:
:

Imports System
Imports System.IO


If i do that in VBscripts it never works, i get errors like crazy. So, either, can i get those to work in VBScripts or is there a way to make a *.exe auto close after it's done running? I would rather go w/ an *.exe / solution file since i can do alot more from it. Let me know. :)

Booooze Jul 20th, 2006 3:50 PM

The reason that code doesn't work is because it imports classes form the .Net framework. VBScripts don't utilize the .Net framework. As for a "*.exe solution", if you mean just close the program using code, try Me.Close() .

randum77 Jul 20th, 2006 8:48 PM

Quote:

Originally Posted by Booooze
The reason that code doesn't work is because it imports classes form the .Net framework. VBScripts don't utilize the .Net framework. As for a "*.exe solution", if you mean just close the program using code, try Me.Close() .

Ah, the comment about imports makes sense now that you say that.

As for the me.close, i now feel absolutly retarded. :confused: Thank you for the reality check! :D I've put that in so many close buttons and didn't even think about it. I can then build the entire procedure in the Load event. Then place the Me.Close() at the end and woopy, it's done. *shakes head in shame* :D

Booooze Jul 20th, 2006 9:11 PM

Quote:

Originally Posted by randum77
Ah, the comment about imports makes sense now that you say that.

As for the me.close, i now feel absolutly retarded. :confused: Thank you for the reality check! :D I've put that in so many close buttons and didn't even think about it. I can then build the entire procedure in the Load event. Then place the Me.Close() at the end and woopy, it's done. *shakes head in shame* :D

That's exactly right. I always wonder if people have tried the simplest solutions. It makes me feel akward when I have to ask them if they did the simplest thing, when it kind of makes them look stupid. Sometimes it is the answer though. Sometimes people just don't think. Not you in paticular or anything. Hell, even I have my moments.

randum77 Jul 21st, 2006 12:34 PM

I have a reputation for over complicating things somtimes. lol So this is proof that this reputation still holds water. :D

Infinite Recursion Jul 21st, 2006 2:25 PM

Quote:

Originally Posted by randum77
I have a reputation for over complicating things somtimes.

Glad to see I'm not the only one :)


All times are GMT -5. The time now is 12:43 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC