Professional Documents
Culture Documents
Cod VB Alterar Cor Form
Cod VB Alterar Cor Form
'Some functions, such as resize the window via mouse, are not implemented yet.
End Sub
Private Sub CustomBorderColorForm_MouseMove(ByVal sender As System.Object,
ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
'Move and refresh.
If (x <> 0 And y <> 0) Then
Me.Location = New Point(Me.Left + e.X - x, Me.Top + e.Y - y)
Me.Refresh()
End If
End Sub
End Sub
'Handle this event to maxmize/normalize the form via double clicking the title
bar.
Private Sub CustomBorderColorForm_MouseDoubleClick(ByVal sender As
System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles
MyBase.MouseDoubleClick
If (titleRect.Contains(e.Location)) Then
If Me.WindowState = FormWindowState.Normal Then
Me.WindowState = FormWindowState.Maximized
maxState = ButtonState.Checked
Else
Me.WindowState = FormWindowState.Normal
maxState = ButtonState.Normal
End If
End If
End Sub