|
-
August 21st, 2010, 06:34 AM
#1
Pausing a program.
Is there any way I can pause my program and for it to need a key-press to resume?
Thank you.
Net 2008
I use VB.Net 2008 in all my wash, for those whiter whites.
-
August 21st, 2010, 12:16 PM
#2
Re: Pausing a program.
Console application, or windows form app? The console can pause only while waiting for input, unless you use SLEEP() to pause execution
-
August 24th, 2010, 03:44 AM
#3
Re: Pausing a program.
For a console application ( DOS mode ), you could simply use Read() or ReadLine(). A Windows based app, may be a lot trickier An API called WaitForInputIdle comes to mind, if I think very very quickly.
-
August 24th, 2010, 06:01 AM
#4
Re: Pausing a program.
In a Win Forms app the simpliest way would be to load a modal form when you want it to pause and then close it when you want to continue.
Always use [code][/code] tags when posting code.
-
August 24th, 2010, 11:38 AM
#5
Re: Pausing a program.
Very strange, I did think with VB-net being so powerful and all, that there would be a simple command for this. Well you live and learn.
Thank you for your replys.
I use VB.Net 2008 in all my wash, for those whiter whites.
-
August 24th, 2010, 03:30 PM
#6
Re: Pausing a program.
The norm is for console apps to only return a value. It either works or it doesn't. If it works, it usually doesn't return anything. What would you want delete to return?
-
August 26th, 2010, 06:41 PM
#7
Re: Pausing a program.
Could use a MsgBox with a simple OK button or InputBox if you wanted to capture a string
-
August 27th, 2010, 12:39 AM
#8
Re: Pausing a program.
It really depends on what your program is doing and how you have coded it, In some cases the pause may just require you to disable a timer, or go into a loop, or disable the controls on the active form, or as mentioned before show a modal form. btw msgbox and input box are both modal forms as is any form shown with the dialog option.
Without knowing what the program is doing and how it is not really possible to know what method would be best here.
Always use [code][/code] tags when posting code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|