Videocurso22 VB.NET- Icono de notificacion


En este video curso de visual basic net veremos el uso de el icono de notificacion que aparece en la barra de tareas .




CODIGO FUENTE


BOTON DE OCULTAR




Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

'ocultar
NotifyIcon1.ShowBalloonTip(5000, "Informacion", "El formulario se ha ocultado", ToolTipIcon.Info)
Me.Hide()


End Sub


DOBLE CLICK EN EL ICONO DE NOTIFCACION




Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick

'QUEREMOS QUE SE MUESTRE EL FORMULARIO

NotifyIcon1.ShowBalloonTip(5000, "Informacion", "El formulario se ha mostrado", ToolTipIcon.Info)
Me.Show()



End Sub



ABRIR DESDE EL ICONO DE NOTIFICACION




Private Sub AbrirToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AbrirToolStripMenuItem.Click

NotifyIcon1.ShowBalloonTip(5000, "Informacion", "El formulario se ha mostrado", ToolTipIcon.Info)
Me.Show()


End Sub




CERRAR PROGRAMA DESDE ICONO DE NOTIFICACION




Private Sub CerrarToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CerrarToolStripMenuItem.Click

Me.Close()

End Sub

2 comentarios :

Seguidores