On Tue, 27 Apr 2004 22:07:34 +0530, Sumit Gupta wrote:
Hi Can any one tell me how to move a form without titlebar as we can use WIn
API in VB 6.0 is there any other method or xyz for the same
Sumit
Override the WndProc method of your form to do it. Here is the code:
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
Const WmNcHitTest As Integer = &H84
Const HtCaption As Integer = 2
If m.Msg = WmNcHitTest Then
m.Result = New IntPtr(HtCaption)
Else
MyBase.WndProc(m) 'THIS IS IMPORTANT!
End If
End Sub
--
Chris
To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.