HI everybody,
I am trying to move a control, like a button on the form
For a specific control it is working like a button, textfield it is working.
But I want to have it in general, so that if u clik on a control that u can move it on the form
I have included the project as zip.
THX anyway.
Moving control on form
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

FroglegRank #1,020 · 1.9K reputationPosted Dec 18, 2011, 10:59 AM EST
Hi Sam
After 2 years early retirement, I rejoined the working class so I don't have the time anymore
FroglegRank #1,020 · 1.9K reputationPosted Dec 15, 2011, 9:42 AM EST
albert albertRank #2,683 · 519 reputationPosted Dec 15, 2011, 10:15 AM EST
But that is only for 1 control.
I mean If u put an extra control on the form u cant move it.
And now only the textfield can move, but not the button.
So it has to be dynamical.
THX
Sam HobbsRank #107 · 20.5K reputationPosted Dec 15, 2011, 4:16 PM EST
Albert, I see no reason why it is not possible to extend Frogleg's code to do what you need done.
As an advanced solution, it might be possible to process the WM_NCHITTEST message and return HTCAPTION but that is probabaly more work than it seems to be.