用API 函数可以,具体是哪个不记得了,
自己找吧!
自己找吧!
解决方案 »
- HTML标记转换问题
- 请教:窗体或按钮上的背景图片,运行时可看到,但在设置或程序里找不到,怎么编的啊?
- 在vs flexgrid8中能直接导出excel,但一些数据类型导出有问题,大家是如可解决的。
- vb中能不能把运行时构造的对象保存下来(保存为文件的形式),下次运行时又从这些文件恢复对象,就像java中的序列化一样?
- 求求高手帮帮群我。。。。。。。。。。。。。。
- 求一份试题答案,谢谢各位 (三)。。。没用过VB的菜鸟求助
- vb6怎么调用webservice
- 求教日期函数问题,谢谢!
- 生成多文档窗口要如何编写代码?
- 怎么用installshield软件制作安装程序?
- 希望既懂股票又会编程的朋友有兴趣进来看看
- 请问怎么取出一串字符串里有几个空格呢?
Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type
Private Sub Form_Load()
Dim OSInfo As OSVERSIONINFO, PId As String
'Set the graphical mode to persistent
Me.AutoRedraw = True
'Set the structure size
OSInfo.dwOSVersionInfoSize = Len(OSInfo)
'Get the Windows version
Ret& = GetVersionEx(OSInfo)
'Chack for errors
If Ret& = 0 Then MsgBox "Error Getting Version Information": Exit Sub
'Print the information to the form
Select Case OSInfo.dwPlatformId
Case 0
PId = "Windows 32s "
Case 1
PId = "Windows 95/98"
Case 2
PId = "Windows NT "
End Select
Print "OS: " + PId
Print "Win version:" + str$(OSInfo.dwMajorVersion) + "." + LTrim(str(OSInfo.dwMinorVersion))
Print "Build: " + str(OSInfo.dwBuildNumber)
End Sub
http://ygyuan.3322.net/
Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type
Private Sub Form_Load()
Dim OSInfo As OSVERSIONINFO, PId As String
'Set the graphical mode to persistent
Me.AutoRedraw = True
'Set the structure size
OSInfo.dwOSVersionInfoSize = Len(OSInfo)
'Get the Windows version
Ret& = GetVersionEx(OSInfo)
'Chack for errors
If Ret& = 0 Then MsgBox "Error Getting Version Information": Exit Sub
'Print the information to the form
Select Case OSInfo.dwPlatformId
Case 0
PId = "Windows 32s "
Case 1
PId = "Windows 95/98"
Case 2
PId = "Windows NT "
End Select
Print "OS: " + PId
Print "Win version:" + str$(OSInfo.dwMajorVersion) + "." + LTrim(str(OSInfo.dwMinorVersion))
Print "Build: " + str(OSInfo.dwBuildNumber)
End Sub
干吗这么麻烦??vba.Environ 就可以了!
?VBA.Environ(12)
OS=Windows_NT