Dragging a button to a new location on a TabPage - I thought it would be easy but I'm finding it otherwise

Controls , Drag Drop , VB.NET , TabPages United Kingdom
  • 9 years ago

    Hi. I've got a tabcontrol on a form in Visual Studio 2005 using VB.NET and have a single object (derived from the button control) on one tabpage that I'm trying to drag to a new location on the same tabpage. I thought this would be simple but I'd appreciate some help. In the button MouseDown event I'm starting the drag operation with:

                Me.DoDragDrop(Me, DragDropEffects.Move)

    I'm then using e.X and e.Y in the tabpage DragOver event to monitor the new screen location of object as its dragged. This all works fine but neither the button or tabpage MouseUp events are firing so I can't capture the final button location after the drag is complete. Any ideas? Thanks.

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Linux is only free if your time has no value” - Jamie Zawinski