Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Dim Respuesta
Respuesta = MsgBox("Desea salir de la aplicacin?", MsgBoxStyle.YesNo, "SALIR")
If Respuesta = vbYes Then
End
Else
Exit Sub
EndIf
LETRAMAYUSCULA
TextBox2.CharacterCasing = CharacterCasing.Upper
SOLO LETRAS EN UN TEXTBOX
If Char.IsLetter(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsSeparator(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
SOLO NUMEROS EN UN TEXTBOX
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
VALIDATEXBOX VACIO
Ife.KeyChar = Microsoft.VisualBasic.Chr(13) Then
If TextBox1.Text = ""Then
MsgBox("Debe digitar el cdigo del usuario.", MsgBoxStyle.Critical, "Ingreso al Sistema")
Exit Sub
EndIf
EndIf
DRAG DROP
Private Movi As Boolean = False
Private PuntoIni As Point
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
PuntoIni = PictureBox1.PointToScreen(New Point(e.X, e.Y))
Movi = True
End Sub
Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
If Movi Then
Dim Puntofin As Point = PictureBox1.PointToScreen(New Point(e.X,
e.Y))
PictureBox1.Left += (Puntofin.X - PuntoIni.X)
PictureBox1.Top += (Puntofin.Y - PuntoIni.Y)
PuntoIni = Puntofin
End If
End Sub
Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp
Movi = False
SOLO NUMEROS EN UN TEXTBOX
IfNot (Asc(e.KeyChar) = 45 Or (Asc(e.KeyChar) >= 48 AndAsc(e.KeyChar) <= 57)) Then
e.Handled = True
EndIf
CUADRO DE TEXTO DE SALIR
Dim Msg, Style, Title, Response
Msg = "Desea salir de la aplicacin?"
Style = vbYesNo + vbExclamation + vbDefaultButton2
Title = "SALIR"
Response = MsgBox (Msg, Style, Title)
If Response = vbYes Then
End
Else
Exit Sub
EndIf