Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows narrative obscures BMP file downloaded
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01640019
Message ID:
01640040
Views:
54
>>How can I stop Windows narrative obscuring bmp file when downloaded?
>>
>>See my file attachment NORTHX.jpg
>>
>>Here is my code
>>
>>SET TALK OFF
>>
>>
>>*FORM/SCREEN CAPTURE TO BMP FILE:
>>*!* make FoxTools available
>>SET LIBRARY TO c:\global\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

>
>A guess: Use the VFP window rather than the desktop (I think FoxTools has a MainHwnd() function that returns the handle)


THanks

But I was hoping for a fix to my code which works perfectly on anything but the new Windows 10 machine

Colin
Specialist in Advertising, Marketing, especially Direct Marketing

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

Click here to load this message in the networking platform