Ayuda por favor!
Publicado por Vanesa (35 intervenciones) el 29/05/2006 10:36:07
Hola, haber si alguien me puede ayudar.
Mi problema es el siguiente: Tengo un boton en un Form que lo que hace es que la ventana(form) se esconda y ponga un icono como el del messenger en la barra de tareas a la derecha.
Pero luego cuando pulso sobre el icono no vuelve a aparecer la ventana ( form). COmo hago para recoger este doble click sobre el icono??
Gracias!!
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim a As System.Windows.Forms.FormWindowState
Me.WindowState = a.Minimized
Dim b As Form1
Dim i As Long, xHeigth As Long, xWidth As Long, xTop As Long, xLeft As Long
Dim xx As Long, yy As Long
'Cancel = 1
xHeigth = Me.Height : xWidth = Me.Width : xTop = Me.Top : xLeft = Me.Left
' i = 0
Me.Height = 0 : Me.Width = 100
' xx = (Screen.PrimaryScreen.Bounds.Width - Me.Left - Me.Width) / 30
' yy = (Screen.PrimaryScreen.Bounds.Height - Me.Top - Me.Height) / 30
' For i = 0 To 30
' RaiseEvent Move(xLeft + xx * i, xTop + yy * i)
' Sleep(5)
' DoEvents()
' Next
Me.Visible = False
Me.Height = xHeigth : Me.Width = xWidth : Me.Top = xTop : Me.Left = xLeft
' Call PonIconoEnLaBarra(Me)
' tiempo.Enabled = False
TextBox2.Text = "ADIOS"
'Shell_NotifyIcon(AddIcon, NotifyIcon1)
Me.Hide()
End Sub
Mi problema es el siguiente: Tengo un boton en un Form que lo que hace es que la ventana(form) se esconda y ponga un icono como el del messenger en la barra de tareas a la derecha.
Pero luego cuando pulso sobre el icono no vuelve a aparecer la ventana ( form). COmo hago para recoger este doble click sobre el icono??
Gracias!!
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim a As System.Windows.Forms.FormWindowState
Me.WindowState = a.Minimized
Dim b As Form1
Dim i As Long, xHeigth As Long, xWidth As Long, xTop As Long, xLeft As Long
Dim xx As Long, yy As Long
'Cancel = 1
xHeigth = Me.Height : xWidth = Me.Width : xTop = Me.Top : xLeft = Me.Left
' i = 0
Me.Height = 0 : Me.Width = 100
' xx = (Screen.PrimaryScreen.Bounds.Width - Me.Left - Me.Width) / 30
' yy = (Screen.PrimaryScreen.Bounds.Height - Me.Top - Me.Height) / 30
' For i = 0 To 30
' RaiseEvent Move(xLeft + xx * i, xTop + yy * i)
' Sleep(5)
' DoEvents()
' Next
Me.Visible = False
Me.Height = xHeigth : Me.Width = xWidth : Me.Top = xTop : Me.Left = xLeft
' Call PonIconoEnLaBarra(Me)
' tiempo.Enabled = False
TextBox2.Text = "ADIOS"
'Shell_NotifyIcon(AddIcon, NotifyIcon1)
Me.Hide()
End Sub
Valora esta pregunta


0