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?
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?