Create systray notification popup menu
Create systray notification popup menu
Create systray notification popup menu
Create systray notification popup menu
Create systray notification popup menu
Create systray notification popup menu Create systray notification popup menu Create systray notification popup menu Create systray notification popup menu Create systray notification popup menu Create systray notification popup menu Create systray notification popup menu Create systray notification popup menu
Create systray notification popup menu Create systray notification popup menu
Create systray notification popup menu
Go Back  Xtreme Visual Basic Talk > > > > Create systray notification popup menu


Reply
 
Thread Tools Display Modes
  #1  
Old 03-24-2015, 06:54 AM
patriciaxxx patriciaxxx is offline
Newcomer
 
Join Date: Mar 2015
Posts: 1
Default Create systray notification popup menu


I need help building a menu using MenuItemInfo() and InsertMenuItem() I have seen many simple examples, most in Excel and using Hook, but none have I seen for Access 2003 without Hook which show how to create all the aspects associated with menus at least the things I need to know like how to accomplish the following:

How do you add a “Separator” line?
How do you add a submenu?
How do you add a bitmap icon?

The icon will be the FaceID number which represents the “Tick” I will need the tick I will need the tick to be present on the item on the submenu which I select ie if the submenu has 4 items then item 1 would be default and show tick and the caption and when I click items 2, 3, or 4 they would show the tick else no tick the onclick action will have to return a value so I can trigger code according to which item was selected.

The code I have so far is as follows:

Code:
Private Sub addMenuItem(hMenu As Long, ItemID As Long, ItemText As String)

    'Add the popup to the context menu.
    Dim mii As MenuItemInfo

    With mii
        .cbSize = Len(mii)
        .fState = MF_ENABLED
        .fMask = MIIM_STATE Or MIIM_TYPE Or MIIM_ID
        .fType = MFT_STRING
        .dwItemData = 0
        .cch = Len(ItemText)
        .hSubMenu = 0
        .wID = ItemID
        .dwTypeData = ItemText
        .hbmpChecked = 0
        .hbmpUnchecked = 0
    End With
    
    Call InsertMenuItem(hMenu, 0, 1, mii)

End Sub
I think the separator, bitmap and submenu have something to do with these:

MFT_SEPARATOR
MIIM_BITMAP
hSubMenu (with the arrow to the right when you click this selection a submenu opens with my other menu selections with the tick)

But how to put it all together and make it work in my function above is a real puzzle to me so any help from someone who has done this or understands how to do this would be really appreciated.

Thank you.
Reply With Quote
  #2  
Old 03-29-2015, 03:35 PM
hDC_0Create systray notification popup menu hDC_0 is offline
Contributor

* Expert *
 
Join Date: Feb 2004
Posts: 559
Default vba code systray menu

Hmmm..I seem to remember an old VBA thread that was classified as an Excel thread,
but the solution provided in the thread was something to do with Access.

It was an ugly solution (using WndProc) and the thread is now very old (dealt with access 2003 vba coding),
but I guess it couldn't hurt to give you the thread link
(just in case no one else posts a reply in this thread):
VBA Add a right click popup menu for the System Tray Icon
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Create systray notification popup menu
Create systray notification popup menu
Create systray notification popup menu Create systray notification popup menu
Create systray notification popup menu
Create systray notification popup menu
Create systray notification popup menu Create systray notification popup menu Create systray notification popup menu Create systray notification popup menu Create systray notification popup menu Create systray notification popup menu Create systray notification popup menu
Create systray notification popup menu
Create systray notification popup menu
 
Create systray notification popup menu
Create systray notification popup menu
 
-->