Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Screen Print
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
01320227
Message ID:
01320237
Views:
26
Sergey

Thanks as always

Colin


>Specify full path for DLL in DECLARE PrintWindow
>
>	DECLARE INTEGER PrintWindow IN o:\vfp\DibApi32.DLL ;
>...
>
>
>
>>Hi I'am using Stephen Ruhl's screen print class - one question - I want to have the DibApapi32.dll on the server o:\vfp instead of the local C drive wondows\system32 - how do I do this?
>>
>>This is his code
>>
>>Thanks
>>
>>Colin
>>
>>
>>SET LIBRARY TO o:\swedvfp\FoxTools.FLL ADDITIVE
>>*!* make the class library available
>>SET CLASSLIB TO scrnprnt.vcx ADDITIVE
>>oCap = NEWOBJECT("capturescreen", "scrnprnt") && Create instance of Screenprint
>>
>>
>>*!* Capturing the active VFP form
>>lnRetVal = oCap.CaptureForm( "filename" )
>>release oz2W
>>return
>>* calling
>>*=printscr()
>>
>>* add this code (from the author) to your function library
>>*********************************
>>* Print the current window
>>function printscr()
>>
>> DECLARE INTEGER GetDesktopWindow IN Win32api
>>
>> DECLARE INTEGER PrintWindow IN DibApi32 ;
>> INTEGER HWnd, ;
>> INTEGER fPrintArea, ;
>> INTEGER fPrintOpt, ;
>> INTEGER wxScale, ;
>> INTEGER wyScale, ;
>> STRING @ szJobName
>>
>> LOCAL nRetVal,cJobName && title you want to show when printing
>>
>> cJobName = 'Current Screen' && or whatever - this could be passed in as a parameter, also.
>>
>> nRetVal = PrintWindow(GetDesktopWindow(),1,1,0,0,@cJobName)
>> IF nRetVal != 0
>> IF nRetVal != 6 && 6 = User canceled printing
>> MESSAGEBOX("Unable to print the window" + chr(10) + ;
>> "See System Administrator " + STR(nRetVal),48, ;
>> "")
>> ENDIF
>> ENDIF
>>
>>RETURN
Specialist in Advertising, Marketing, especially Direct Marketing

I run courses in Business Management and Marketing
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform