Adding Global system menu item

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • iwdu15

    #1

    Adding Global system menu item

    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 "AppendMenu A"
    (ByVal hMenu As Integer, ByVal wFlags As Integer, ByVal wIDNewItem As
    Integer, ByVal lpNewItem As String) As Integer

    Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
    System.EventArg s) Handles MyBase.Load

    Dim hSysMenu As Integer
    hSysMenu = GetSystemMenu(M e.Handle.ToInt3 2, False)

    'appends new menu items
    AppendMenu(hSys Menu, 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

    --
    -iwdu15
  • iwdu15

    #2
    RE: Adding Global system menu item

    ok, i got that. now how about handling when the menu is clicked? thanks
    --
    -iwdu15

    Comment

    Working...