home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!linac!uchinews!quads!pynq
- From: pynq@quads.uchicago.edu (Jeremy Mathers)
- Subject: Popping up the System menu in a DOS window
- Message-ID: <1993Jan25.234918.24476@midway.uchicago.edu>
- Summary: (Via programmatic control)
- Sender: news@uchinews.uchicago.edu (News System)
- Reply-To: pynq@midway.uchicago.edu
- Organization: D. J. Dougherty & Associates
- Date: Mon, 25 Jan 1993 23:49:18 GMT
- Lines: 38
-
- Is it possible to simulate the pressing of Alt/Space in a DOS window, in
- order to bring up the System menu? I need to be able to do this for a
- project I am working on.
-
- I would think the following fragment ought to work, but it doesn't:
-
- xor ax,ax
- mov ds,ax
- or byte ptr [417],8 ; Turn on Alt
- mov ax,4F39 ; (39 = scan code for space)
- stc ; sentinel for ignoring key
- int 15
- ...
-
- Note: the above code was cribbed from the reboot code in the
- comp.os.msdos.programmer FAQ.
-
- My background: I am an experienced DOS programmer, and have written
- many "pop" programs to pop up TSRs that read the keyboard directly, so I
- am familiar with the general concepts (tracing the interrupts, etc)
- Generally, all you have to do is follow the INT 9 handler, but I noticed
- that WIN386 doesn't capture INT 9, so I am surmising that it is watching
- the keyboard via INT 15. (It could also be doing it via INT 8, but that
- didn't seem to be the case)
-
- But I am not a Windows programmer, nor do I have any desire to be.
- Thus, email responses would be greatly appreciated, since I probably
- don't read this group...
-
- ************************************************************************
- Our buggy newsreader limits
- the length of .signature files
- to 4 lines, but I have figured out
- a way to have as many lines as
-
- - pynq@quads.uchicago.edu, who is still costing the net
- hundreds, if not thousands, of dollars, every time he posts -
- ************************************************************************
-