Torna al Thread
Protected Overrides Sub WndProc(ByRef m As Message)
If Not FlagMobile Then
If m.Msg = WM_SYSCOMMAND And m.WParam.ToInt32() = SC_MOVE OrElse m.Msg = WM_NCLBUTTONDOWN And m.WParam.ToInt32() = HTCAPTION Then
Return
End If
End If
MyBase.WndProc(m)
End Sub
<System.ComponentModel.DefaultValue(True), System.ComponentModel.Description("Permette all'utente di spostare la form")> _
Public Property Mobile() As Boolean
Get
Return FlagMobile
End Get
Set(ByVal Mobile As Boolean)
FlagMobile = Mobile
End Set
End Property
<System.ComponentModel.DefaultValue(True), System.ComponentModel.Description("Se False, rimuove la X di chiusura della form")> _
Public ReadOnly Property ConLaX() As Boolean
Get
Return FlagConX
End Get
'Set(ByVal ConLaX As Boolean)
' FlagConX = ConLaX
' If FlagConX Then
' GetSystemMenu(GetSystemMenu(Me.Handle, False), SC_CLOSE)
' Else
' RemoveMenu(GetSystemMenu(Me.Handle, False), SC_CLOSE, MF_BYCOMMAND)
' End If
'End Set
End Property
End Class