Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Image in the clipboard to disk?
Message
From
29/08/2008 10:28:23
 
 
To
29/08/2008 07:45:43
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01343003
Message ID:
01343116
Views:
18
Hi Tore,
I needed something like this as well, so I tried but it gives me error
on this line which is perhaps call to a function you forgot to include;
**errors here
Return filesize(cFilename)>0
Can you post code of this filesize() fnction as well ?

TIA
Sergio




>>I want to have a button on a form take the png image in the clipboard (put there by snagit) and bring up the filer dialog (getfile()) and save it
>>
>>Is this possible?
>>
>>or could i just automate snagit to let me grab and save (as Rick does in wwHlp) any pointers how to do this?
>>
>>
>>peter
>
>
>Function saveclipasjpg
>   Lparameters cFilename
>   Local llReturn, GDIP, img
>   If Pcount()=0 Or Vartype(cFilename)#'C'
>      cFilename="ClipImage"
>   Endif
>   cFilename=Forceext(cFilename,'jpg')
>   Erase (cFilename)
>   If clipIsImage() &&Len(_cliptext)=0
>      #include gpimage.h
>      If Not "GPIMAGE" $ Set("Procedure")
>         Set Procedure To gpimage Additive
>      Endif
>      GDIP = Createobject("gpInit")
>      img = Createobject("gpImage")
>      img.FromClipboard()
>      img.saveAsJpeg(cFilename)
>*!*      Release gdip
>*!*      Release img
>   Endif
>Return filesize(cFilename)>0
>
>Function clipIsImage
>   #Define CF_BITMAP           2
>   Declare short IsClipboardFormatAvailable In win32api Integer cbformat
>Return IsClipboardFormatAvailable(CF_BITMAP)#0
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform