如何判断操作系统的版本
解决方案 »
- vb中用shell explorer打开网页或资源管理器,总是报毒,怎么办?
- 关于VB中MSHFlexGrid控件的行高度问题
- 怎样判断网页内容完全打开
- 急!急!!急!!!答完马上就给分!初次使用VB,向各位大虾请教在VB写的DLL中如何访问SQL SERVER数据库,谢谢了!!!
- 如何操作DBF数据库
- 简单问题,在线等待,马上给分.
- combobox的style为2,如何在获取焦点时让combobox的text值变成我要的
- 刚才 我在 chinaren 打拱猪,5把只win 了一把,太惨了。55555555
- 关于VB对数据库的查询问题(特急!!!!!!!!)
- VB+W2K+ADO+informix中,Update数据随机出现错误!!!
- 请问为什么我一用vsflex7.0,运行时就会弹出个小窗口呢?怎么解决?
- 中英文字符串搜索(like 或 Instr)
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