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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to disable ctrl-break

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
i need to disable the ctrl-break interupt because i am trying to make a password program to run in DOS.
 
See the "Blinking Cursor" example on this page. CTRL+Break will stop a QB program while it is polling for keystrokes in the QB IDE, but it has no effect after the program is compiled.

This is in contrast to using an INPUT statement, where CTRL+Break will interrupt your program, regardless.

Try it.
VCA.gif

Alt255@Vorpalcom.Intranets.com
"To run Visual Basic, you must have certain hardware and software installed on your computer.
• Any IBM-compatible machine with an 80286 processor or higher.
• One megabyte of memory."


Visual Basic Programmer's Guide
 
Alt255:

Here's a slightly modified code, although it will produce a control(ED) break at the END of the program. It may be of use to someone.

[tt]CLS
Password$ = ""
LOCATE 12, 2: PRINT "Enter Password: "
DO
LOCATE 12, 18 + LEN(Password$), 1, 8, 9
I$ = INPUT$(1)
'I$ = INKEY$
IF I$ = CHR$(0) + "m" THEN
SLEEP 1
END IF
IF I$ = CHR$(13) THEN EXIT DO
IF I$ <> &quot;&quot; THEN PRINT &quot;*&quot;;
Password$ = Password$ + I$
LOOP
PRINT
PRINT
PRINT &quot;word=&quot;, Password$[/tt]

As you can see, I've only added two more lines and REM'd out one. Of course it may need to be touched up a bit for different apps. But it should work.

-MiggyD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top