Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New Print Screen FAQ now available
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00267522
Message ID:
00270889
Views:
32
>>Okay, some progress...try this now in command window:
>>
>>cJobName = "Bon Matin"
>>DECLARE INTEGER PrintWindow IN DibApi32 ;
>> INTEGER HWnd, ;
>> INTEGER fPrintArea, ;
>> INTEGER fPrintOpt, ;
>> INTEGER wxScale, ;
>> INTEGER wyScale, ;
>> STRING @ szJobName
>>nRetVal = PrintWindow(3,1,1,0,0,@cJobName)
>>
>>and see what happens, do you get past the error?
>No error, nothing happens (no printing)
>(nRetval=21)
>More progress...
>And now ?
>
>Merci beaucoup et bonne journée
>
>Michel

Michel,
A return value of 21 means the function that copies the window to a DIB failed. Two things can cause this. One is an invalid printarea argument and 1 is a valid value. The other is the HWnd parameter does not contain a valid Windows HWnd handle. I think that's your problem.

Make sure you are passing a Windows HWnd handle not a VFP WHANDLE. They are not the same thing.
Steve Ruhl
CitiMortgage, Inc.
steven.ruhl@citibank.com Office
Steve@steven-ruhl.com Home
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform