1
Good morning, good afternoon, good evening, person! I am having the following difficulty:
I put for a form open when it reaches the 30 and 60 seconds mark. All right, this worked, but only when I have the main form open (not minimized), but I need it to open, even with the minimized main form, how can I do this?
My code:
Public Class Form1
Private Sub btnIniciar_Click(sender As Object, e As EventArgs) Handles btnIniciar.Click
trmConometro.Start()
If lblSegundo.Text = "02" Then
MsgBox("Creeps saindo da base")
End If
End Sub
Private Sub trmConometro_Tick(sender As Object, e As EventArgs) Handles trmConometro.Tick
lblSegundo.Text += 1
If lblSegundo.Text = "60" Then
lblMinuto.Text += 1
lblSegundo.Text = "00"
ElseIf lblMinuto.Text = "60" Then
lblHora.Text += 1
lblMinuto.Text = "00"
End If
If lblSegundo.Text = "30" Then
Creeps_saindo_da_base.ShowDialog()
ElseIf lblSegundo.Text = "59" Then
Creeps_saindo_da_base.Show()
End If
End Sub
Private Sub Form1_KeyDown(sender As Object, e As KeyEventArgs) Handles MyBase.KeyDown
If e.KeyCode = Keys.M Then
trmConometro.Start()
End If
End Sub
Private Sub btnParar_Click(sender As Object, e As EventArgs) Handles btnParar.Click
trmConometro.Stop()
lblSegundo.Text = "00"
lblMinuto.Text = "00"
lblHora.Text = "00"
End Sub
Private Sub trmSairMSG_Tick(sender As Object, e As EventArgs) Handles trmSairMSG.Tick
End Sub
End Class
Thank you
Hello @Lucas. Welcome to Sopt. Enjoy doing the Tour to better understand how the site works. As to your question, the form
Creeps_saindo_da_base
is aMdiChild
or is a form "normal"?– João Martins