G
Guest
hi, i can add an item to the system menu for my application by doing this:
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Integer,
ByVal bRevert As Boolean) As Integer
Private Declare Function AppendMenu Lib "user32" Alias "AppendMenuA"
(ByVal hMenu As Integer, ByVal wFlags As Integer, ByVal wIDNewItem As
Integer, ByVal lpNewItem As String) As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim hSysMenu As Integer
hSysMenu = GetSystemMenu(Me.Handle.ToInt32, False)
'appends new menu items
AppendMenu(hSysMenu, 0, 1000, "Tray Me")
End Sub
but that only adds the menu item for my app....how can i set it to be there
for every application? is it somehting i need to handle in the WindowProc
event? something else? thanks
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Integer,
ByVal bRevert As Boolean) As Integer
Private Declare Function AppendMenu Lib "user32" Alias "AppendMenuA"
(ByVal hMenu As Integer, ByVal wFlags As Integer, ByVal wIDNewItem As
Integer, ByVal lpNewItem As String) As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim hSysMenu As Integer
hSysMenu = GetSystemMenu(Me.Handle.ToInt32, False)
'appends new menu items
AppendMenu(hSysMenu, 0, 1000, "Tray Me")
End Sub
but that only adds the menu item for my app....how can i set it to be there
for every application? is it somehting i need to handle in the WindowProc
event? something else? thanks