如何在64位系统中跑32位php,32位系统的代码如何在64位系统上运行?

以下代码在32系统上运行良好,但在64位系统上就运行不畅,请教如何修改?太折腾人了,想哭,求救。。。。。。

'申明API函数

Private Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long

Private Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long

Private TimerID As Long

Public WithEvents thisApp As Application

Private Sub thisApp_SlideShowBegin(ByVal Wn As SlideShowWindow)

Dim prompt As String

prompt = " 演讲时间默认30分钟,最长300分钟。" _

& vbCrLf _

& vbCrLf & " 演讲者自行修改时间,按确定键开始计时!" _

& vbCrLf _

& vbCrLf & " 邮箱3312@163.com" _

& vbCrLf _

& vbCrLf & "2018年6月"

Duration = Val(InputBox(prompt, "演讲倒计时管理器", "30"))

'将演讲时间单位转换为秒

If Duration <= 0 Then

Exit Sub

'Duration = 45 * 60

ElseIf Duration > 300 Then

Duration = 300 * 60

Else

Duration = Duration * 60

End If

'在母板上添加一个文本框,用以显示时间;该文本在结束放映时被删除。

Dim txtShowTime As Shape

Set txtShowTime = ActivePresentation.SlideMaster.Shapes.AddTextbox(msoTextOrientationHorizontal, ActivePresentation.SlideMaster.Width - 100, 5, 110, 40)

'设置该文本框的Name属性

txtShowTime.Name = "Timer"

'设置该文本框的文本格式

txtShowTime.TextFrame.TextRange.Text = "倒计时开始"

With txtShowTime.TextFrame.TextRange.Font

.Name = "New Time Roman"

.Size = 20

.Bold = msoTrue

.Color.RGB = RGB(255, 50, 0)

End With

'创建定时器,触发时间为1秒,到时执行TimerProc过程

TimerID = SetTimer(0, 0, 1000, AddressOf TimerProc)

If TimerID = 0 Then

ActivePresentation.SlideMaster.Shapes("Timer").Delete

MsgBox "由于系统原因,不能创建定时器!"

Exit Sub

End If

End Sub

Private Sub thisApp_SlideShowEnd(ByVal Pres As Presentation)

If TimerID <> 0 Then

'终止定时器

TimerID = KillTimer(0, TimerID)

'删除时间显示文本框

ActivePresentation.SlideMaster.Shapes("Timer").Delete

End If

End Sub

Public thisPPT As New CTimer

Public Duration As Long  '演讲时间

Sub Auto_Open()

' 启动PowerPoint时可以自动运行的宏

Set thisPPT.thisApp = Application

End Sub

Sub Auto_Close()

' 关闭PowerPoint时可以自动运行的宏

Set thisPPT.thisApp = Nothing

End Sub

'定时器到时的时候要执行的过程

Public Sub TimerProc()

'DoEvents

'剩余的秒数

Duration = Duration - 1

'将剩余的秒数转换为"时:分:秒"的格式

'小时数

h = Int(Duration / 3600)

temp = Duration Mod 3600

'分钟数

m = Int(temp / 60)

'秒数

s = temp Mod 60

'函数TimeSerial将小时数、分钟数、秒数合并成时间格式

If TimeSerial(h, m, s) <= TimeSerial(0, 0, 0) Then

'退出放映

ActivePresentation.SlideShowWindow.View.Exit

Else

'在文本框中显示时间

ActivePresentation.SlideMaster.Shapes("Timer").TextFrame.TextRange.Text = Format(TimeSerial(h, m, s), "演讲计时" & "hh:mm:ss")

End If

End Sub

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值