shuja_khan5
asked on
Alt+PrintScreen to clipboard using powerbuilder
I want to use take a screenshot(like Alt+PrintScreen) in my MDI application and copy
the screenshot to the clipboard using PowerBuilder.
From the clipboard i want to paste it into a word document.
I do not want to use the available PB functions Print() and PrintScreen(),
as they send the screenshot directly to the printer.
the screenshot to the clipboard using PowerBuilder.
From the clipboard i want to paste it into a word document.
I do not want to use the available PB functions Print() and PrintScreen(),
as they send the screenshot directly to the printer.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
hi,
more assistance ???
Cheers,
Rosh
more assistance ???
Cheers,
Rosh
here u are... the following code will give u the functionality of Alt+PrintScreen...
u need to declare a global external Function:
SUBROUTINE keybd_event( int bVk, int bScan, int dwFlags, int dwExtraInfo) &
LIBRARY "user32.dll"
and in the clicked event of ur button(or wherever u please)... write the following code...
keybd_event( 44,1,0,0 ) //Alt+PrintScreen
//to print the whole desktop u need to write...
//keybd_event( 44,0,0,0 ) //PrintScreen
Cheers,
Rosh