欢迎来到天天文库
浏览记录
ID:52022595
大小:26.00 KB
页数:1页
时间:2020-03-21
《隐藏和回显菜单栏.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、隐藏和回显菜单栏2001-07-10文章编号:000064提交人:Melon阅读次数:1116分两个热点:在整个form中要定一个全局变量DimhmenuAsLong热点1:(隐藏菜单栏)DeclareFunctionGetActiveWindowLib"user32.dll"()AsLongDeclareFunctionGetMenuLib"user32.dll"(ByvalhmenuAsLong)AsIntegerDeclareFunctionSetMenuLib"user32.dll"(Byv
2、alhmenuAsLong,ByvalnewmenuAsLong)AsIntegerSubClick(SourceAsButton)DimhwndAsLonghwnd=GetActiveWindow()hmenu=GetMenu(hwnd)CallSetMenu(hwnd,0)EndSub热点2:(回显菜单栏)DeclareFunctionGetActiveWindowLib"user32.dll"()AsLongDeclareFunctionGetMenuLib"user32.dll"(Byvalhm
3、enuAsLong)AsIntegerDeclareFunctionSetMenuLib"user32.dll"(ByvalhmenuAsLong,ByvalnewmenuAsLong)AsIntegerSubClick(SourceAsButton)DimhwndAsLonghwnd=GetActiveWindow()IfhmenuThenCallSetMenu(hwnd,hmenu)ElseMsgbox"现在菜单正在显示"EndIfEndSub
此文档下载收益归作者所有