>>>>Hi Dawa
>>>>
>>>>The code worked on VFP 8.0 . Thanks alot.
>>>>
>>>>I have another application on VFP 6.0, for the code to work I need to get the forms window handle using the _WhToHwnd API function.
>>>>I read about that fuction and still I did not know how to run it. Do you know how to fill the gap for the following code:
>>>>
>>>>
>>>> IF VERSION(5) < 700
>>>> *-- Need to get the forms window handle
>>>> ELSE
>>>> THIS.nHwnd = THIS.HWnd
>>>> ENDIF
>>>>
>>>>
>>>>Thanks
>>>>
>>>>Bob
>>>>
>>>>PS.
>>>>
>>>>My main problem is to change color of my form's Active title bar without doing any changes to my Windows Desktop appearance. Any suggestions
>>>
>>>Bob,
>>>
>>>First, it's not considered good form to change the user's preferences, including the color of the active window.
>>>
>>>Second, in the following code, note the comment and the adjustment
>>>IF VERSION(5) < 700
>>> SET LIBRARY TO FOXTOOLS
>>> This.hWnd = _WhTohWnd(_WFindTitl(This.Caption))
>>>ELSE
>>> * This will throw an error since
>>> * the property is read-only
>>> THIS.nHwnd = THIS.HWnd
>>>ENDIF
>>
>>George,
>>How are you doing. Sorry but I'd like to correct one thing here :
>>
>>if type('version(5)') = 'U' or version(5)/100 < 7
>>
>>since doing a version check a proability we're doing this in VFP5 or 3 :)
>>Cetin
>
>Cetin,
>
>I'm doing fine. How about you and your's?
>
>You know you, of all people, don't need to apologize for correcting one of my mistakes.
>
>However, even before your post, I thought that there might be a better way of doing this. What about a compiler directive? IOW, use an #IF/#ENDIF to check this. That way regardless of the version, things are only compiled that need to be.
>
>Regards,
I'm doing fine too, thanks. Yes compiler directives, an almost always forgotten powerfull feature :)
Cetin