Adding Global system menu item

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top