>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,
I can't think of anyway of changing the window's title color without changing the descktop appearance other than making your own title bar. However, since what you want is the Active title bar, I found a way of retrieving the Window Handle.
IF VERSION(5) < 700
SET LIBRARY TO foxtools.fll
DECLARE Long GetTopWindow IN WIN32API Long nHwnd
THIS.nHwnd = GetTopWindow(MainHwnd())
ELSE
THIS.nHwnd = THIS.HWnd
ENDIF
MainHwnd() returns the main VFP funtion and the GetTopWindow returns the active window'handle.
Hope this helps,
Dawa
Dawa Tsering
"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."
- Ephesians 4:29-30 NIV
Dare to Question -- Care to Answer
Time is like water in a sponge, as long as you are willing you can always squeeze some.
--Lu Xun, Father of Modern Chinese Literature