美文网首页
隐藏和显示Notes客户端菜单栏

隐藏和显示Notes客户端菜单栏

作者: IT小C | 来源:发表于2016-04-02 17:20 被阅读221次

本功能只在5.0,6.5.7.0 Notes客户端版本中测试通过,因为客户端是基于C++的,而8.0,8.5的客户端是基于Eclipse的,所以未测试该功能是否可行。
分两个热点:
在整个form中要定一个全局变量

Dim hmenu As Long

热点1:(隐藏菜单栏)

Declare Function GetActiveWindow Lib "user32.dll" () As Long
Declare Function GetMenu Lib "user32.dll" ( Byval hmenu As Long) As Integer
Declare Function SetMenu Lib "user32.dll" ( Byval hmenu As Long, Byval newmenu As Long ) As Integer
Sub Click(Source As Button)
Dim hwnd As Long
hwnd = GetActiveWindow()
hmenu=GetMenu(hwnd) 
Call SetMenu(hwnd,0)
End Sub

热点2:(显示菜单栏)

Declare Function GetActiveWindow Lib "user32.dll" () As Long
Declare Function GetMenu Lib "user32.dll" ( Byval hmenu As Long) As Integer
Declare Function SetMenu Lib "user32.dll" ( Byval hmenu As Long, Byval newmenu As Long ) As Integer 
Sub Click(Source As Button)
Dim hwnd As Long
hwnd = GetActiveWindow() 
If hmenu Then
Call SetMenu(hwnd,hmenu)
Else
Msgbox "现在菜单正在显示"
End If
End Sub 

相关文章

网友评论

      本文标题:隐藏和显示Notes客户端菜单栏

      本文链接:https://www.haomeiwen.com/subject/oxzylttx.html