
VB问题,十万火急~菜鸟求帮助,高手速来助!谢谢~拒绝沙发!
我做了一个自动关机的代码,但怕它不设置时间导致直接关机,所以把:PrivateSubenter_Click()DimhAsInteger,mAsInteger,sAsIn...
我做了一个自动关机的代码,但怕它不设置时间导致直接关机,所以把:
Private Sub enter_Click()
Dim h As Integer, m As Integer, s As Integer
h = t1.Text
m = t2.Text
s = t3.Text
Shell "shutdown -s -f -t " & h * 3600 + m * 60 + s
End Sub
这段代码加成了:
Private Sub enter_Click()
Dim h As Integer, m As Integer, s As Integer
h = t1.Text
m = t2.Text
s = t3.Text
if h+m+s>1 then
Shell "shutdown -s -f -t " & h * 3600 + m * 60 + s
else
beep
magbox "请输入数据!“
--------------------------------
却显示我没定义~怎么办 展开
Private Sub enter_Click()
Dim h As Integer, m As Integer, s As Integer
h = t1.Text
m = t2.Text
s = t3.Text
Shell "shutdown -s -f -t " & h * 3600 + m * 60 + s
End Sub
这段代码加成了:
Private Sub enter_Click()
Dim h As Integer, m As Integer, s As Integer
h = t1.Text
m = t2.Text
s = t3.Text
if h+m+s>1 then
Shell "shutdown -s -f -t " & h * 3600 + m * 60 + s
else
beep
magbox "请输入数据!“
--------------------------------
却显示我没定义~怎么办 展开
展开全部
这样改。
=============
Private Sub enter_Click()
Dim h As Integer, m As Integer, s As Integer
h = t1.Text
m = t2.Text
s = t3.Text
if h+m+s>1 then
Shell "shutdown -s -f -t " & h * 3600 + m * 60 + s
else
beep
msgbox "请输入数据!" '看看你的拼写错误,另外引号之能是"而不能是“
end if '必须有这一句.
=============
Private Sub enter_Click()
Dim h As Integer, m As Integer, s As Integer
h = t1.Text
m = t2.Text
s = t3.Text
if h+m+s>1 then
Shell "shutdown -s -f -t " & h * 3600 + m * 60 + s
else
beep
msgbox "请输入数据!" '看看你的拼写错误,另外引号之能是"而不能是“
end if '必须有这一句.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询