
- 帖子
- 23
- 积分
- 32
- 威望
- 40
- 金钱
- 38
- 在线时间
- 0 小时
|
用VB制作定时发作的病毒
建立一个TIMER控件,把TIMER的Interval属性设置成100
给TIMER控件加入以下代码
Dim a
Private Sub Timer1_Timer()
a = #0:00:00 PM# '发作的时间,自己可以修改
Form1.Caption = Time '把FORM1的标题改成时间
If Form1.Caption = a Then
magbox "发作", 48, '这个是时间到了后自动弹出的对话框,也可以把它改成别的。
End If
End Sub
接下来给FORM1加代码
Private Sub Form_Load()
Form1.Visible = False '在初始化过程中隐藏主窗体
Form1.ShowInTaskbar = False '不在任务栏显示
End Sub  |
|