============
Private sub form_load() '加
On Error Resume Next
Dim WSHshellA
Set WSHshellA = wscript.CreateObject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -r -t 20 -c ""说我是傻瓜,否则20秒内自动关机,不信,试试···"" ", 0, True
Dim a
Do While (a <>"我是傻瓜")
a = InputBox("说我是傻瓜,就不关机,快啊,说 ""我是傻瓜"" ", "说不说", "我", 8000, 7000)
MsgBox Chr(13) + Chr(13) + Chr(13) + a, 0, "MsgBox"
Loop
MsgBox Chr(13) + Chr(13) + Chr(13) + "早说就行了嘛"
Dim WSHshell
Set WSHshell = wscript.CreateObject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a", 0, True
MsgBox Chr(13) + Chr(13) + Chr(13) + "哈哈哈哈,傻瓜万岁!!"
end sub '加
这个是工程文件中的编码,不是程序代码,我对照一下,Type1 = Exe 这句Type没有1
Form = FORM01.FRM 这句有没有问题啊?一般默认是FORM1.FRM,检查一下窗体文件名是form01.frm还是form1.frm。
这个不是程序代码,用vb打开的话应该看不到的,别当作代码复制到代码窗口中。
Private Sub Command1_Click()Label1.Caption = ""
For a = 0 To 20
For b = 0 To 33
c = 100 - a - b
If 15 * a + 9 * b + c = 300 Then
Label1.Caption = Label1.Caption & "公鸡母鸡小鸡各" & a & "," & b & "," & c & " 只 " & vbCrLf 'vbcrlf是在同一行的
End If
Next
Next
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)