I just want to move a button on a form at run time. When I do a mousedown and drag the button I get an outline of the button. But when I do a mouseup the outline disapears and nothing happens. So where am I going wrong? Thanks.
Code:
Private Sub btnbutton_MouseDown(Index As Integer, Button As Integer, Shift As Integer, leftpos As Single, toppos As Single)
btnbutton(Index).Drag vbBeginDrag
End Sub
Private Sub btnbutton_MouseUp(Index As Integer, Button As Integer, Shift As Integer, leftpos As Single, toppos As Single)
btnbutton(Index).Left = leftpos
btnbutton(Index).Top = toppos
btnbutton(Index).Drag vbEndDrag
End Sub