I've got another questions about User Controls!
I want to move a control around the screen by simple dragging and dropping. I've done this very easily in the code for the form that an instance of the control exists on.
However I don't want to have to add the code to drag and drop the control (and goto a function that aligns it to grid coords) every time I put the control on a new form. Ideally I want the drag and drop code in with the code for the User Control itself. I was thinking that it would be something like this:
but it doesn't like that!Code:Private Sub LabelOnControl_MouseDown(Button as Integer.....) UserControl.Drag End Sub
Any ideas how I can do this? Is OLEdrag useful? I couldn't work out how this differed to normal drag and drop.
thanks
Paul




Reply With Quote