Saturday, August 08, 2009 7:07 PM
I actually have to questions related to the same subject. First, I would like to know how to drag and drop items from a toolbox, for example, and onto a control coded to accept them.
My second question is how could I move a form, with the mouse, that is completely customised.
- Moved by nobugzMVP, Moderator Saturday, August 08, 2009 7:16 PM not a clr q (From:Common Language Runtime)
Saturday, August 08, 2009 9:06 PMHello Developer911,
Take a look at the following link for drag and drop:
What do you mean by "how could I move a form, with the mouse, that is completely customised"? Are you saying there is no longer a TitleBar on your Form? If so, all you need to do is use this API:
Const WM_NCHITTEST As Integer = &H84 Const HTCLIENT As Integer = &H1 Const HTCAPTION As Integer = &H2 Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) Select Case m.Msg Case WM_NCHITTEST MyBase.WndProc(m) If m.Result = HTCLIENT Then m.Result = HTCAPTION Case Else 'Make sure you pass unhandled messages back to the default message handler. MyBase.WndProc(m) End Select End Sub
- Marked As Answer by Xingwei Hu Friday, August 14, 2009 3:15 AM
Sunday, August 09, 2009 7:39 PMhave a look here:
Monday, June 13, 2011 12:14 PM