首页 > 学院 > 开发设计 > 正文

利用API函数实现隐藏和显示桌面图标

2019-11-18 17:34:30
字体:
来源:转载
供稿:网友
PRivateDeclareFunctionFindWindowLib"user32"Alias"FindWindowA"(ByVallpClassNameAsString,ByVallpWindowNameAsString)AsLong
PrivateDeclareFunctionShowWindowLib"user32"(ByValhwndAsLong,ByValnCmdShowAsLong)AsLong
PrivateConstSW_HIDE=0
PrivateConstSW_RESTORE=9

'隐藏桌面图标
PrivateSubCommand1_Click()
DimHwdAsLong
DimrtnAsLong
Hwd=FindWindow("Progman",vbNullString)
rtn=ShowWindow(Hwd,SW_HIDE)
EndSub

'显示桌面图标
PrivateSubCommand2_Click()
DimHwdAsLong
DimrtnAsLong
Hwd=FindWindow("Progman",vbNullString)
rtn=ShowWindow(Hwd,SW_RESTORE)
EndSub->


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表