Re: Is there any way I can print out the form as it looks on the screen?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



This routine will print the clipboard from Word

ox=CREATEOBJECT("word.application")
ox.Visible = .t.
odoc=ox.Documents.Add()
ox.Selection.Paste
odoc.printout


This function will send the keystrokes to Windows to capture your screenshot
to the clipboard. There are probably other methods.


* Declare the Function
DECLARE INTEGER keybd_event IN Win32API ;
INTEGER, INTEGER, INTEGER, INTEGER
VK_SNAPSHOT = 44 && from the winuser.h
VK_LMENU = 164
KEYEVENTF_KEYUP = 2
KEYEVENTF_EXTENDEDKEY = 1


* To get just the Active window
DOEVENTS
keybd_event(VK_SNAPSHOT, 1, 0, 0 )
keybd_event(VK_SNAPSHOT, 1, KEYEVENTF_KEYUP, 0 )
DOEVENTS


* To get the Full windows desktop
DOEVENTS
keybd_event( VK_LMENU, 0, KEYEVENTF_EXTENDEDKEY, 0 ) && key down
keybd_event( VK_SNAPSHOT, 0, KEYEVENTF_EXTENDEDKEY, 0 )
keybd_event( VK_SNAPSHOT, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
keybd_event( VK_LMENU, 0, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0 )
DOEVENTS


I hope this helps,

Dan






"Thorkell" <thorkell@xxxxxxxxx> wrote in message
news:e00XHU9YFHA.3220@xxxxxxxxxxxxxxxxxxxxxxx
> Is there any way I can print out the form as it looks on the screen? VFP9
>
>
>
> Thanks,
>
> Thorkell
>
>


.



Relevant Pages

  • Re: Meaning of keyboard keys
    ... Pressing the key copies the entire display to the ... the clipboard. ... paste the contents of the clipboard (your screenshot) into the open ... How to Capture Screen Shots in Windows Using the Print Screen Key ...
    (microsoft.public.windowsxp.hardware)
  • Re: Print screen button does not work
    ... MS-MVP Windows Shell/User ... entire screen like the normal screenshot function. ... This will clear out *everything* from the System Clipboard. ...
    (microsoft.public.windowsxp.general)
  • Re: Print Screen doesnt work
    ... By design, as it has always been with every version of Windows, pressing the key copies the entire display, including the Desktop Wallpaper, to the clipboard. ... This will paste the contents of the clipboard (your screenshot) into the open file, and allow you to view it or save it as a file for later use. ... The philosopher has never killed any priests, whereas the priest has killed a great many philosophers. ...
    (microsoft.public.windowsxp.basics)
  • Re: Print screen button does not work
    ... I have the same Windows as you, and it handles the PrintScreen function ... with XP service pack 1, ... entire screen like the normal screenshot function. ... This will clear out *everything* from the System Clipboard. ...
    (microsoft.public.windowsxp.general)
  • Re: JavaScript, Print Screen & Windows Clipboard
    ... pressed the 'PrintScreen' key to screenshot, via the Windows Clipboard, ... Providing that you can dictate that your website users are using IE, they have script enabled, and they have allowed you programmatic access to the clipboard. ...
    (comp.lang.javascript)