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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drag and Drop (Problems with Listbox changing)

Status
Not open for further replies.

deadzed

Programmer
Feb 10, 2005
9
US
I have been incorporating the Drag and Drop procedure (found in the Microsoft Knowledge Base at to drag data from one listbox to another on a form.

It works great, but I'm having one small problem. Once I "mouse down" on the item that I want to drag, it will highlight is as the selection. For the duration of time that the mouse button is down, if I move above or below the plane of the item that I selected, the selection will change. So if the mouse is not moved perfectly horizontal from the dragbox to the dropbox, the selection will change and the wrong item will be moved.

Is there a way to "lock-in" my listbox selection so that it is prevented from changing until after the drag-and-drop event is complete?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top