vb里面的好像有错,,子过程或函数未定义,怎么改
OptionExplicitDeclareFunctionSetTimerLib"user32"(ByValhwndAsLong,ByValnIDEventAsLong,...
Option Explicit
Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Declare Function KillTimet Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
Public TimerID As Long
Public bTimerState As Boolean
Sub TimerOnOff()
If bTimerState = False Then
TimerID = SetTimer(0, 0, 1000, AddressOf TimerProc)
If TimerID = 0 Then
MsgBox "Unable to create the timer", vbCritical + vbOKOnly, "Error"
Exit Sub
End If
bTimerState = True
Else
TimerID = KillTimer(0, TimerID)
If TimerID = 0 Then
MsgBox "Unabletostopthetimer", vbCritical + vbOKOnly, "Error"
End If
bTimerState = False
End If
End Sub
Sub TimerProc(ByVal hwnd As Long, ByVal uMsg As Long, ByVal idEvent As Long, ByValdwTime As Long)
ActivePresentation.SlideMaster.HeadersFooters.Footer.
Text = Format(Time, "hh:nn:ss")
End Sub 展开
Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Declare Function KillTimet Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
Public TimerID As Long
Public bTimerState As Boolean
Sub TimerOnOff()
If bTimerState = False Then
TimerID = SetTimer(0, 0, 1000, AddressOf TimerProc)
If TimerID = 0 Then
MsgBox "Unable to create the timer", vbCritical + vbOKOnly, "Error"
Exit Sub
End If
bTimerState = True
Else
TimerID = KillTimer(0, TimerID)
If TimerID = 0 Then
MsgBox "Unabletostopthetimer", vbCritical + vbOKOnly, "Error"
End If
bTimerState = False
End If
End Sub
Sub TimerProc(ByVal hwnd As Long, ByVal uMsg As Long, ByVal idEvent As Long, ByValdwTime As Long)
ActivePresentation.SlideMaster.HeadersFooters.Footer.
Text = Format(Time, "hh:nn:ss")
End Sub 展开
2个回答
展开全部
ActivePresentation.SlideMaster.HeadersFooters.Footer.
Text = Format(Time, "hh:nn:ss")
改为:
ActivePresentation.SlideMaster.HeadersFooters.Footer.Text = Format(Time, "hh:nn:ss")
Text = Format(Time, "hh:nn:ss")
改为:
ActivePresentation.SlideMaster.HeadersFooters.Footer.Text = Format(Time, "hh:nn:ss")
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Declare Function KillTimet Lib "user32" ...
改为
Declare Function KillTimer Lib "user32" ...
改为
Declare Function KillTimer Lib "user32" ...
追问
汗,看到了
再问下,后面还有个语法错误怎么改
ActivePresentation.SlideMaster.HeadersFooters.Footer.
看的是http://wenku.baidu.com/view/d0c75cd5195f312b3169a5da.html里面的方法三,改不来
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询