Results 1 to 4 of 4

Thread: [RESOLVED] Tray Balloon Issue in Windows 10 Displays Executable Name in Balloon Tip

  1. #1

    Thread Starter
    Hyperactive Member Hassan Basri's Avatar
    Join Date
    Sep 2006
    Posts
    324

    Resolved [RESOLVED] Tray Balloon Issue in Windows 10 Displays Executable Name in Balloon Tip

    Hello everybody. I have an application that displays the tray balloon using the standard code (below). This works good on all Windows versions. I just noticed that on Windows 10 the balloon displays as expected except that in addition to the text, title that are always displayed Windows displays the "File description" variable (In VB6 when making a project you can enter some information that get compiled into the description of the executable). If I clear that variable then Windows 10 displays the exectuable name instead. I tried saving an empty space in the variable and it still displays the executable. Anybody know how to remove this executable name? As a last resort I can save a "." but it won't look as nice.

    So in summary

    Before Windows 10 the tray balloon would display (which is what I want)
    Title
    Message

    Since Windows 10 the tray balloon displays
    Title
    Message
    File Description or Executable Name


    Code:
    Public Sub ShellTrayIconAdd(hWnd As Long, hIcon As StdPicture, sToolTip As String)
       
    On Error Resume Next
       
    If NOTIFYICONDATA_SIZE = 0 Then SetShellVersion
    
    With nid
        .cbSize = NOTIFYICONDATA_SIZE
        .hWnd = hWnd
        .uID = APP_SYSTRAY_ID
        .uFlags = NIF_MESSAGE Or NIF_ICON Or NIF_TIP Or NIF_INFO
        .dwState = NIS_SHAREDICON
        .hIcon = hIcon
        .szTip = sToolTip & vbNullChar
        .uTimeoutAndVersion = NOTIFYICON_VERSION
        .uCallbackMessage = WM_MYHOOK
    End With
    
    'add the icon ...
    If Shell_NotifyIcon(NIM_ADD, nid) = 1 Then
        '... and inform the system of the
        'NOTIFYICON version in use
        Call Shell_NotifyIcon(NIM_SETVERSION, nid)
        'prepare to receive the systray messages
        Call SubClass(hWnd)
    End If
    Thank you

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Tray Balloon Issue in Windows 10 Displays Executable Name in Balloon Tip

    I'm not sure you can.

    The old-style notifications appear to get routed through some "legacy support" service now that makes use of the new "desktop toast notifications API" that may be difficult to use from a VB6 program directly. Even if you figured out the API, there are requirements you might not like.

    See: How to enable desktop toast notifications through an App User Model ID

    This topic shows you how to create a shortcut for your app, assign it an App User Model ID, and install it in the Start screen. We strongly recommend that you do this in the Windows Installer rather than in your app's code. Without a valid shortcut installed in the Start screen or in All Programs, you cannot raise a toast notification from a desktop app.
    So you need to be packaged as a "Store App" and properly installed as such.

  3. #3
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,393

    Re: Tray Balloon Issue in Windows 10 Displays Executable Name in Balloon Tip

    You could try using a Chr$(160) instead of ".", but a better idea might be to use something descriptive and useful instead.

  4. #4

    Thread Starter
    Hyperactive Member Hassan Basri's Avatar
    Join Date
    Sep 2006
    Posts
    324

    Re: Tray Balloon Issue in Windows 10 Displays Executable Name in Balloon Tip

    Thanks everybody for your input. Since I cannot remove it I decided to go with an underscore

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width