'===========================================================================
' Subject: EXPOSE WINDOWS DESKTOP             Date: 06-06-00 (11:50)       
'  Author: Matthew R. Walsh                   Code: QB, PDS                
'  Origin: ozzpimp@hotmail.com              Packet: MISC.ABC
'===========================================================================
' Expose the Windows(R) desktop in Quick Basic 4.5
' (c) 2000 Matthew R. Walsh, OzzPIMP@hotmail.com
' http://www.start.at/The_Underground
'
' You can use this code in your programs, just please be sure to give me some
' kind of credit, thanx.
'
'
DECLARE SUB ShowDesktop (screenmode!)
TYPE RegType
     AX    AS INTEGER
     bx    AS INTEGER
     CX    AS INTEGER
     dx    AS INTEGER
     bp    AS INTEGER
     si    AS INTEGER
     di    AS INTEGER
     flags AS INTEGER
END TYPE
DIM SHARED regs AS RegType

PRINT "This program WILL retrive an image of the Windows desktop, from"
PRINT "inside Quick Basic... (C) 2000 Matthew R. Walsh, OzzPIMP@hotmail.com"
PRINT "Created in Microsoft(R) Quick Basic(R) 4.50"
PRINT "Press ANY key to continue..."
SLEEP
' The values for the ShowDesktop(screenmode) screenmode attribute are:
' 1 - 640x480
' 2 - 800x600
' 3 - 1024x768
' 4 - 1280x1024
' 5 - 1600x1280
ShowDesktop (3)

SLEEP
SCREEN 0
PRINT "Now, wasnt that the coolest thing you have ever seen?!"
PRINT ""
PRINT "(C) 2000 Matthew R. Walsh, OzzPIMP@hotmail.com"
PRINT "http://www.start.at/The_Underground"
PRINT ""

SUB ShowDesktop (screenmode)
SCREEN 12
s = 1
IF screenmode = 1 THEN s = 1
IF screenmode = 2 THEN s = 2
IF screenmode = 3 THEN s = 3
IF screenmode = 4 THEN s = 4
IF screenmode = 5 THEN s = 5
FOR i = 1 TO s
regs.AX = &HB8 + i
CALL INTERRUPT(&H10, regs, regs)
NEXT


END SUB
