Thanks to splendid Netmaestro code
viewtopic.php?p=400913#p400913
I can choose what window i want put in my screenshot
But i try since 3 hours to locate the image without succes
Code: Select all
Prototype.l pPrintWindow(hWnd.l, hDc.l, lFlags.l)
Global hLib.l = OpenLibrary(#PB_Any , "user32.dll")
Global PrintWindow_.pPrintWindow = GetFunction(hLib , "PrintWindow")
RunProgram("Explorer.exe", "/n, C:\" , "")
While Not HwndC
Delay(500)
HwndC = FindWindow_(#Null, "C:\")
Wend
SetWindowPos_(HwndC, 0, 200, 200, -1, -1, #SWP_NOSIZE | #SWP_NOACTIVATE)
ExamineDesktops()
CreateImage(0, DesktopWidth(0), DesktopHeight(0), 24)
hdc = StartDrawing(ImageOutput(0))
PrintWindow_(FindWindow_(#Null, "Program Manager"), hdc, 0)
PrintWindow_(HwndC, hdc, 0)
StopDrawing()
SizeScreenShotX = DesktopWidth(0) / 2
SizeScreenShotY = DesktopHeight(0) / 2
ResizeImage(0, SizeScreenShotX, SizeScreenShotY)
OpenWindow(0,0,0,SizeScreenShotX, SizeScreenShotY, "", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
ImageGadget(0,0,0,SizeScreenShotX, SizeScreenShotY,ImageID(0))
Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow
CloseLibrary(hLib)
Have a good day