PublicConst WM_NCLBUTTONDOWN AsInteger=&HA1 PublicConst WM_NCHITTEST AsInteger=&H84 PublicConst HTCAPTION AsInteger=2 PublicConst HTCLIENT AsInteger=1 ProtectedOverridesSub WndProc()Sub WndProc(ByRef m As System.Windows.Forms.Message) If m.Msg =Me.WM_NCHITTEST Then MyBase.WndProc(m) If m.Result.ToInt32 =Me.HTCAPTION Then m.Result =New IntPtr(Me.HTCLIENT) EndIf Else MyBase.WndProc(m) EndIf End Sub
此段代码重写了WndProc的方法,可以是窗体固定在桌面上。
posted on
2007-06-19 14:04小黑三
阅读(344)
评论(0)
编辑收藏举报