How do U....

 BBS: Inland Empire Archive
Date: 07-02-92 (07:02)             Number: 214
From: PHIL HODGES                  Refer#: NONE
  To: BREK WENDELN                  Recvd: NO  
Subj: How do U....                   Conf: (2) Quik_Bas
Hello, Brek...

BW>I have a few embarrassing questions... but some weird
BW>things you don't know... Smarter people ask questions
BW>anyway.  So..... Get to the point.
BW>I would like to know a line(s) of code that disable the
BW>following keys within a program:

BW>1.) The ALT-C combination
BW>2.) The Ctrl-Break combination
BW>3.) The Ctrl-Alt-Del combination
BW>4.) The Ctrl-Alt-Ins combination
BW>I think you get my point, so please list any others I may have forgotten.

  What does ALT-C do?? Check the ON KEY...GOSUB for that one.

  CTRL-C (Ctrl-Break) can be disabled:

  Dim Old%(4)
  Def Seg=0
   'Save the old Ctrl-C address
  For I = &H6C to &H6F
  Poke &H6C, &H53
  Poke &H6D, &HFF
  Poke &H6E, &H0
  Poke &H6F, &HF0
  Def Seg

  Note: this may not work on all computers (but most!)
  Be sure to restore the old address before your program exits:

  Def Seg = 0
  For I =&H6C to &H6F
   Poke I, Old%(I-&H6c)
  Next I

BW>I would also like to know how (in a line(s) of program code how to tell the
BW>computer in a statement to do something when a key
BW>combination is pressed -- like Alt-? and/or Alt-?-? & Ctrl-
BW>? and/or Ctrl-?-?

   Just check the online help under ON KEY...GOSUB in the QB environment
on that one.

 X SLMR 2.1a X "Worry..this will hurt."  - Sadistic Dentist
--- Maximus 2.00
 * Origin: The Gamorian Vortex Project (1:105/601)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET