home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / mswindo / programm / misc / 5373 < prev    next >
Encoding:
Text File  |  1993-01-26  |  1.9 KB  |  51 lines

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