Hi Cetin,
Now that you told me, I noticed that underscore in your previous reply :)
At the end I discovered it myself (and so did Borislav) from
foxtools help.
3*s for you as well :)
Since I had this little trouble implementing obj2bmp, here comes wrapper function that might be usefull to other people who will need obj2bmp tool.
It can be also added to some form class as a method.
=save_form_as_bmp(thisform,'C:\myDir\myBmp.bmp')
Function itself ;
function save_form_as_bmp
lparameters oForm,cFile
local sv_titlebar,oMaker,lnHwnd
sv_titlebar=oForm.TitleBar
oForm.TitleBar = 0
if ! "FOXTOOLS" $ set("LIBRARY")
set library to sys(2004) + "FOXTOOLS.FLL" additive
endif
set classlib to obj2bmp.VCX additive
lnHwnd = _WhTohWnd(_WFindTitl(oForm.caption))
oMaker=createobject('bmpmaker')
oMaker.cFileName=cFile
local lcFile
lcFile=oMaker.makebitmap(lnHwnd)
oForm.titlebar=sv_titlebar
oMaker=.f.
release classlib obj2bmp.VCX
return lcFile
Provided that classlib obj2bmp.VCX is is somewhere in path.
Thank you again.
Rgds+++
Sergio
>Read my first reply to you. Function's name start with an underscore.
>Cetin
>
>>Hi Naomi & Guys,
>>
>>I am preparing to upgrade within couple of months (just after end of year hurdle is over). More for sake of catching up with version & the rest of the world who is using VFP then real need to do so. I hv no single problem with VFP6/SP5. Except of course small ones, like the one in this thread :))
>>
>>Now what gets me confused here is, if problematic call (WhTohWnd) is in foxtools then why it is not working ? Hence statement in capital letters at the begining of the sample.
>>
>>After that
>>
>>
>>? set('library')
>>
>>
>>Shows foxtools added.
>>
>>Is it maybe typo error in function name ? I just repeated what is in
>>obj2bmp help.
>>Any other speed fix before I dive in Foxtools help ?
>>
>>BTW
>>Sorry for delayed answer, I was out for weekend.
>>Rgds++
>>
>>
>>>>Naomi,
>>>>
>>>>No he can't. That property does not exist in VFP6.
>>>>
>>>>>I guess I misunderstood your remark. Anyway, now Srdjan can simplify the code.
>>>
>>>Didn't notice the version number. May be it's time to upgrade? <g>