VB实例编程:vb.net实现简单的眼睛保护系统_第2页

考试站(www.examzz.com)   【考试站:中国教育考试第一门户】   2011年11月10日

  If flag Then
  e.Cancel = True
  End If
  End Sub
  Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  Me.Timer1.Interval = CLng(Form1.MaskedTextBox2.Text) * 1000 * 60
  Me.ProgressBar1.Minimum = 0
  Me.ProgressBar1.Maximum = CLng(Form1.MaskedTextBox2.Text) * 60
  End Sub
  Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  Form1.Timer2.Enabled = True
  Me.Close()
  End Sub
  Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
  If i <= CInt(Form1.MaskedTextBox2.Text) * 60 Then
  Me.Focus()
  Me.TopMost = True
  If i = CInt(Form1.MaskedTextBox2.Text) * 60 - 10 Then
  flag = False
  End If
  Me.WindowState = FormWindowState.Maximized
  i = i + 1
  Me.ProgressBar1.Value = i
  End If
  End Sub
  End Class
  4.小结:这个软件基本上实现了保护眼睛和身体的作用,可以阻止疯狂的使用电脑而不休息。对于保护好自己的眼睛和身体有重要的作用!特色:打开后不能关闭。除非在任务管理器中结束进程!需要.NET Framework支持。强制保护你的身体!有好的身体才有好的明天!建议用1分钟测试!
首页 1 2 尾页

相关文章