Link to home
Start Free TrialLog in
Avatar of zastava101
zastava101

asked on

move controls at runtime ?

how to select and then move (or resize) controls at runtime?

thanks in advance
Avatar of edey
edey

to move and resize at runtime you need to catch the WM_NCHITTEST message.

GL
Mike
ASKER CERTIFIED SOLUTION
Avatar of edey
edey

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Zastava101,

I don't know what you are up to, but this seems rather simple to me and I maybe edey's answer is not what you have been looking for.

You can just change the top / left / width and height properties of the control at runtime. This will move/resize the control.

Moving and resizing controls to adjust them to the form size (when the user resizes a form) is standardly done by using the controls published property (in the object inspector) Anchor.

Finding out which control is selected by the user (which one has focus) can be done by inspecting the forms ActiveControl property.

Hope this helps you out.

Spada
SPADA,while Zastava101has not clarified the question, and you do offer a solution to an alternative problem, I'm not sure it merits an "answer".  Perhaps Zastava101 could help us out here?

GL
Mike
Avatar of zastava101

ASKER

sorry for delay, i will concider edey's answer.
Hi zastava101, how's it coming?

GL
Mike
sorry for delay.
:-)
No problem - GL with the scanning :)

GL
Mike
he he. thanks :)