lemontree是什么意思:在运行vb程序失败后,总提示:无法在 dll kernle32 中找到名为 gettickcount 的 入口点, 该怎么办呢?
来源:百度文库 编辑:杭州交通信息网 时间:2024/05/04 19:08:16
目的是得到windows 运行的时间,用的是API函数 gettickcount.代码如下:
private declare function gettickcount lib"kernel32"()_
as long
Public Sub getruntime()
Dim runtime As Integer
Dim hour As Integer
Dim minute As Integer
Dim second As Integer
runtime = gettickcount() \ 1000
hour = runtime \ 3600
runtime = runtime - 3600 * hour
minute = runtime \ 60
second = runtime - 60 * minute
MsgBox("windows运行的时间是:" & Str(hour) & "小时" & Str(minute) & "分钟" & Str(second) & "秒")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
getruntime()
End Sub
End Class
private declare function gettickcount lib"kernel32"()_
as long
Public Sub getruntime()
Dim runtime As Integer
Dim hour As Integer
Dim minute As Integer
Dim second As Integer
runtime = gettickcount() \ 1000
hour = runtime \ 3600
runtime = runtime - 3600 * hour
minute = runtime \ 60
second = runtime - 60 * minute
MsgBox("windows运行的时间是:" & Str(hour) & "小时" & Str(minute) & "分钟" & Str(second) & "秒")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
getruntime()
End Sub
End Class
你的调用语句写得有问题
正确为:
Declare Function GetTickCount Lib "kernel32" Alias "GetTickCount" () As Long
在运行vb程序失败后,总提示:无法在 dll kernle32 中找到名为 gettickcount 的 入口点, 该怎么办呢?
运行后总提示无法链接网站。
运行碎片整理程序整理C盘(系统盘)时,总提示,有程序在使用,无法自动修复。如何关闭运行程序?
运行碎盘整理程序整理C盘(系统盘)时,总提示,有程序在使用,无法自动修复。如何关闭运行程序?
开机后,总显示有程序在运行
用VB编写的程序在没有安装VB的电脑上无法运行
我的电脑在装入某个应用软件时,提示我的电脑没有VB语言,无法运行这个程序,该怎么办
运行virtual pc本身程序的时候提示:无法在实模式下运行!
VB程序在其它电脑上运行
在vb中怎么编一个程序,在开机的时候2分钟后自动运行