>Bernard, I tried it and it does work. There is one proviso though. The GetFocus API call actually gets the keyboard focus. Because the controls on the form don't have actual window handles, it works. But, and hopefully this is just a small but, try this:
>
>add an activex control that does have an hwnd (for example, MS's Date/Time Picker control). Now bring up the form, and click on the OLE control and set a date. Now click on the form and try moving it.
>
>As long as the last control on the form to have the focus does not have it's own HWnd, it works properly.
>
>You might want to add a line in the mousedown to set the focus somewhere safe before trying to move the form just in case.
>
>Alan
>
Thanks Alan.
Actually this GetFocus() was the only API I could find to give me a handle on the window. Most others I looked at needed the Caption to be passed to identify the form clicked.
Finally I got this API thanks to Jim Booth. I know there are limitations. I use this as a splash screen and almost as is. So no problem.
I will investigate your reply soon.
Thanks
Bernard