>>>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)
>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.
Hi Steven - you're right, this was only a test to try to identify the problem. The '3' in the handle position was intentionally suggested by me just to ensure the Print Window was working correctly, and it is, 21 was expected, as you say.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.