怎么自动检测到当前windows的语言版本?windows2000?
解决方案 »
- VB 能否连接广域网空间上的MYSQL数据库
- 如何用VB的api实现FTP文件上传?有人知道吗?
- 一个很基础的问题,求助
- setup factory 如何在安装完成后在桌面生成快捷方式 在线等
- 我急需一分一万字的社会调查,有位兄弟帮下忙啊!
- SSTab1 如何禁止切换
- 请问一个关于treeview的问题?
- 急急急急急急 关于如何改变datareport建立的表格线如何改变线的粗线。在线等待。。。。。
- 公式编辑器的调用,很抱歉,我的分用完了,但是设计需要,急啊
- 谁有VRML编辑器,或告诉我那里有的下,谢谢
- 几个小问题,挺杂的,望指教
- 请教高手!关于报表中动态改变标签内容和文本框的绑定字段的问题。急,在线等待!!!
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
'KPD-Team 1998
'URL: http://www.allapi.net/
'[email protected]
'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
Dim OS As StringWith SysInfo1
Select Case .OSPlatform
Case 0: OS = "Win32"
Case 1:
Select Case .OSVersion
Case 4: OS = "Win 95"
Case 4.1: OS = "Win 98"
Case 4.9: OS = "Wim Me"
End Select
Case 2:
Select Case .OSVersion
Case 4: OS = "Win NT"
Case 5: OS = "Win 2000"
Case 6: OS = "Win XP"
End Select
End Select
MsgBox "Build:" & .OSBuild & vbNewLine & _
"Platform:" & OS & "(" & .OSPlatform & ")" & vbNewLine & _
"Version:" & .OSVersion
End With
加载SysInfo控件
Private Sub Form_Load()
Select Case SysInfo.OSPlatform
Case 0
lstInfo.AddItem "OS Platform = Unknown 32-Bit Windows"
Case 1
lstInfo.AddItem "OS Platform = Windows 95"
Case 2
lstInfo.AddItem "OS Platform = Windows NT"
End Select
lstInfo.AddItem "OSVersion = " & SysInfo.OSVersion
lstInfo.AddItem "OSBuild = " & SysInfo.OSBuildEnd Sub