Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to drag drop an editbox 1

Status
Not open for further replies.

samsnead

Programmer
Sep 3, 2005
100
CA
I have an editbox that I make visible on a screen under certain conditions. I want ability to move(drag) it. Is this possible?
 
Is this possible?

At it's simplest you'll need something like this in the Mousedown of the control:
[TT]
this.Drag()
[/TT]
and this in the DragDrop of the form:
[TT]
oSource.Move(nXCoord, nYCoord)
[/TT]

You'll need to add more code to allow for the offset between the mouse position and the top-left corner of the control but that's the core of the solution.

Geoff Franklin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top