Visual Basic窗体表单应用程序问题
嗨,我正在使用Visual Studio 2010,我遇到了一个问题
我需要制作一个计时器功能,当计时器结束时,应用程序会弹出屏幕甚至应用程序最小化。
我尝试谷歌并使用MsgBox,但仍然没有弹出屏幕应用程序!
答案 0 :(得分:0)
快来看看
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.TopMost = True
Timer1.Enabled = False
MsgBox("Time to take a break! Yay!!", MsgBoxStyle.Information, "Breaktime")
MsgBox("Click OK when you've had a break!", MsgBoxStyle.Question, "Waiting!")
Timer1.Enabled = True
Me.TopMost = False
End Sub
答案 1 :(得分:0)
我知道这是一个老话题,但请查看:
Me.WindowState = FormWindowState.Minimized
Me.WindowState = FormWindowState.Normal
Me.WindowState = FormWindowState.Maximize