Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WAIT FOR USER INPUT

Status
Not open for further replies.

jscorpion

Programmer
Nov 17, 2000
40
0
0
US
Is there a way to stop the program and wait for user input. I am creating a barcode software. The user scans their ID then scans there process such as open job and next scans job number. I am currently using a case statement tracking were they are at, but after the process I would like to stop the program and wait for the next scan or for a time to elapse. I would prefer not to create a dialog box on another form and call for that to resemble and input box. I would like to use the same simple interface without using other forms. Does anyone know where I could find this or could send me some code example. It would be much appreciated for I have ran into this problem before with no solution.

thank you,

jscorpion
 
You can use the sleep method on the thread.

--------------------------------------
"We are star-stuff. We are the universe made manifest trying to figure itself out."
-- Delenn in Babylon 5 - "A Distant Star"
 
jscorpion,

What type of barcoding software are you using, if I may ask?
 
I am writing my own using a wasp scanner and a number pad running in a windows environment. I decided to go ahead and use SpiderBear6 suggestion and go with threads. I am running two threads one running the questions and waiting for input thru the thread.pause command and an accept button running thread.invoke and I am catching the exception and continuing on with my program. If the pause runs out I return to the main loop which is an infinite loop calling the above function.

thanks for the help SpiderBear6

jscorpion
 
Glad I could help, jscorpion.

--------------------------------------
"We are star-stuff. We are the universe made manifest trying to figure itself out."
-- Delenn in Babylon 5 - "A Distant Star"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top