vb判斷作業系統型別,VB判斷作業系統型別

2022-02-25 07:53:54 字數 2375 閱讀 7481

1樓:匿名使用者

如何用vb**實現判斷當前的作業系統是中文的還是英文的,如,中文的xp系統還是英文的xp,謝謝! 通過api 函式getsystemdefaultlcid 判斷系統的語言 option

2樓:

private declare function getversionex lib "kernel32" alias "getversionexa" (lpversioninformation as osversiononfo) as long

private type osversiononfo

dwosversioninfosize as long

dwmajorversion as long

dwminorversion as long

dwbuildnumber as long

dwplatformld as long

dwcsdversion as string * 128

end type

public function systemver() as variant

dim osinfor as osversiononfo, strosname as string

osinfor.dwosversioninfosize = len(osinfor)

getversionex osinfor

select case osinfor.dwplatformld

case 0

strosname = "windows 32s"

case 1

select case osinfor.dwminorversion

case 0

strosname = "windows 95"

case 10

strosname = "windows 98"

case 90

strosname = "windows mellinnium"

end select

case 2

select case osinfor.dwmajorversion

case 3

strosname = "windowsnt 3.51"

case 4

strosname = "windowsnt 4.0"

case 5

select case osinfor.dwminorversion

case 0

strosname = "windows 2000"

case 1

strosname = "windows xp"

case 2

strosname = "windows 2003"

end select

case 6

select case osinfor.dwminorversion

case 0

strosname = "windows vista"

case 1

strosname = "windows 7"

end select

end select

case else

strosname = "未知系統版本"

end select

systemver = strosname

end function

private sub command1_click()

msgbox systemver

end sub

c#怎樣判斷當前是什麼作業系統

3樓:匿名使用者

//獲取系統資訊

system.operatingsystem osinfo = system.environment.osversion;

//獲取作業系統id

system.platformid platformid = osinfo.platform;

//獲取主版本號

int versionmajor = osinfo.version.major;

//獲取副版本號

int versionminor = osinfo.version.minor;

詳細出處參考

4樓:匿名使用者

system.operatingsystem osinfo = system.environment.osversion;

5樓:傲月狂神

這個,,,真不知道。。

6樓:電腦人人有經驗

右鍵點選我的電腦→屬性→常規,這裡就能看到啦!

vb6怎樣判斷串列埠掉線,vb如何使用串列埠通訊

建立一個串列埠通訊 serialport currentport null currentport new serialport currentport.readbuffersize 128 currentport.portname comname 埠號 currentport.baudrate b...

程式設計判斷數字是否為迴文數。vb語言

private sub mand1 click text1.text trim text1.text if isnumeric text1.text thenif text1.text strreverse text1.text then msgbox text1.text 是迴文數。else ms...

VB中如何判斷32位的Integer其中的某一位,比如第10位是0還是1(二進位制值)

vb 邏輯遠算符也是位運算運算子 private function isbitsetnotzero x as long,n as integer as integer if n 1 or n 32 then isbitsetnotzero 1 返回 1表示傳入引數錯誤,1表示該位為1,0表示該位為零...