前端之家收集整理的这篇文章主要介绍了
VB中判断.NET3.5是否安装,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
OptionExplicit
DimhRAsLong
PrivateConstHKEY_LOCAL_MACHINE=&H80000002
PrivateDeclareFunctionRegOpenKeyLib"advapi32.dll"Alias"RegOpenKeyA"(ByValhKeyAsLong,ByVallpSubKeyAsString,phkResultAsLong)AsLong
PrivateDeclareFunctionRegQueryValueExLib"advapi32.dll"Alias"RegQueryValueExA"(ByValhKeyAsLong,ByVallpValueNameAsString,ByVallpReservedAsLong,lpTypeAsLong,lpDataAsAny,lpcbDataAsLong)AsLong
PrivateSubCommand1_Click()
RegOpenKeyHKEY_LOCAL_MACHINE,"SOFTWARE/Microsoft/.NETFramework/v2.0.50727/NGENService/ListenedState",hR
DimrAsLong
r=RegQueryValueEx(hR,"RootstoreDirty",0)
Ifr=2Then
MsgBox"不存在"
Else
MsgBox"存在"
EndIf
EndSub 原文链接:https://www.f2er.com/vb/258340.html