Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
http://community.csdn.net/Expert/TopicView3.asp?id=3276756Private Sub Command1_Click() Dim a For Each a In Me.Controls MsgBox a.Name 'MsgBox a. If TypeName(a) = "Menu" Then MsgBox "这是菜单:" & a.Name End If Next End Sub 临时做出来,不要见笑
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
--------------------------------------------------------------------------------
如果一个软件(如WORD)打开了正在被使用, 如何让个另一程序知道用户在用什么菜单, 甚至全部菜单的结构--------------------------------------------------------------------------------
将使用情况放在公共变量中,大家都可以访问。
--------------------------------------------------------------------------------
GetMenu?GetMenuItemInfo?
Dim a
For Each a In Me.Controls
MsgBox a.Name
'MsgBox a.
If TypeName(a) = "Menu" Then
MsgBox "这是菜单:" & a.Name
End If
Next
End Sub
临时做出来,不要见笑