'把窗体的formborderstyle 设置为 none
在代码页里加入下面这代码 就可以实现无边框窗体移动了
Protected Overrides Sub WndProc(ByRef m As Message)
Const WM_NCHITTEST As Integer = &H84
Const HTCLIENT As Integer = &H1
Const HTCAPTION As Integer = &H2
If m.Msg = WM_NCHITTEST Then
Me.DefWndProc(m)
If m.Result.ToInt32() = HTCLIENT Then
m.Result = New IntPtr(HTCAPTION)
Else
MyBase.WndProc(m)
End If
Else
MyBase.WndProc(m)
End If
End Sub
限制输入就 下面的 方法, 具体限制什么自己加加就可以了。。
(Asc(e.KeyChar) < Keys.D0 Or Asc(e.KeyChar) > Keys.D9) And Asc(e.KeyChar) <> Keys.Back And Asc(e.KeyChar) <> Keys.Delete