NotifyIcon Libary

Discussion in 'Additional Libraries' started by dzt, Jul 3, 2007.

  1. dzt

    dzt Active Member Licensed User

    Allows to display an icon to Notification Area on PPC (NotifyIcon.dll) and to Systam Tray on PC (NotifyIconDesktop.dll)

    Add - Adds the application Icon to Notification Area for PPC and the icon ni.ico to System Tray for PC. For PPC the icon should be 16x16 pixels.

    Remove - removes the Icon

    IconText - (PC only) The text to display when the mouse is over the icon

    Click - Fires when the icon is clicked

    The PPC source code (with some modifications) is from NotifyClient sample found on MSDN (Microsoft Developers Network)

    Attached is a zip file with DLLs and sample ni.ico

    PPC version c# source code can be downloaded from here
    PC version c# source code can be downloaded from here

    For how to use it, see dzSpy application I've posted here

    Attached Files:

  2. Cableguy

    Cableguy Expert Licensed User

    I not to sure what this does!

    Can you post a simple example?

    P.S.: Your work is great....But form me, that i'm not familiar to some of the expressions and terms you use, or some device OS events, it gets difficult to understand what some of you dll actually do!!
  3. dzt

    dzt Active Member Licensed User

    See attached pictures

    Attached Files:

  4. dzt

    dzt Active Member Licensed User

    And a short sample.

    Compile it (needs notifyicon libraries and formlib) and put test3.exe, NotifyIcon.dll and FormLib.dll in your device
    Run test3.exe, press "Show Icon", then the cross upper right.

    You will see the icon in Notification Area (as in pic1)

    Click the icon...

    Attached Files:

    Last edited: Jul 3, 2007
  5. JJM

    JJM Active Member Licensed User

    Hi Dimitris,

    Thanks for your new dll which is usefull for some programs.
    I don't understand the use of ni.IconText ?

    Please :sign0085:

    Best regards

    JJ M
  6. dzt

    dzt Active Member Licensed User

    Hi JJM,

    IconText is useful only for desktop computer not for PPC.
    Put your mouse pointer over any icon in System Tray and you will see some text to appear.

    For your program you could set this text using the IconText property.

    Run on your PC test3.sbp I've posted.

  7. Cableguy

    Cableguy Expert Licensed User

    At least for me when icontext is set it get covered by the TaskBar so the text is not visible...
  8. dzt

    dzt Active Member Licensed User

    Hi GableGuy,

    I don't know why this happens to your computer. I've tested it in several PCs with various operating systems (Windows 2000, XP, Vista) and works fine in every case.

    But I've made the library for PPC. The desktop version made only to help to design the app in basic4ppc. And in that case (PPC) IconText is a dummy property.

  9. JJM

    JJM Active Member Licensed User


    For me on my PC and on my PPC (HP ipac 2490) all is fine.

    Best regards

    JJ M
  10. agraham

    agraham Expert Licensed User

    Are you running XP and is popup text from other icons on the task bar also covered by the task bar? If so then it is a known bug and either this short program or the batch file in the text file should fix it.

    This used to happen occasionally on my XP system and when it did I just ran FixToolTips.exe for an instant fix.

    Attached Files:

  11. Cableguy

    Cableguy Expert Licensed User

    Thanks Agraham, That did the trick....Never happend before with any other app....that was the first time, and my system is about 6 months old...with a few hundred apps running...
  12. agraham

    agraham Expert Licensed User

    It's not app dependent and no-one seems to know quite why it happens and Microsoft never fixed it. Some systems suffer, on others it never happens. It doesn't happen on my laptop but it occurred every couple of months on my main system (now on Vista).

    Keep that little app - you may need it again in a month or so!
  13. blackiice

    blackiice Member

    thanks a lot,just what I need
  14. dzt

    dzt Active Member Licensed User

    Hi all,

    The old NotifyIcon.DLL for PPC does not work for apps compiled by B4PPC version 5.80 and above. This is because the icon name inside the .EXE has changed from "#32512" (default resource name) to "B4PICON".

    The new attached NotifyIcon.DLL targets by default to version 5.80 and above (at least until the icon name remains the same).

    But setting it's newly added property Version580andAbove = False will work fine for previous versions also.

    No problem and therefore no new version for NotifyIconDesktop.DLL

    This issue pointed by alfcen here

    Thank you Robert!

    Attached Files:

  15. dzt

    dzt Active Member Licensed User


    Attached in the zip is the new NotifyIcon compatible with Basic4PPC v6.0.

    A new property added: Version6andAbove.
    Set it to True (default) to work with v6.0

    Attached Files:

  16. burd27

    burd27 Member Licensed User

    Has anyone else had an issue where no Icon appears on the Today Screen Toolbar?

    I have written my own code using this Library, but no Icon appeared. So I downloaded the "Test3" sample, compiled it (non optimized), etc....still no Icon.

    I have the Form Library, NotifyIcon Library and the ni.ico all in the same directory as the ".exe" file. I have the latest version of the NotifyIcon Library. I am running B4P 6.05 / WM5 on a Dell Axim X51v.

    On the Desktop, the Icon appears in the SysTray and if clicked triggers the ni_click procedure fine. But nothing works on the Device.

    Obviously, I'm missing something. Any Ideas?

    Last edited: Mar 13, 2008
  17. alfcen

    alfcen Well-Known Member Licensed User

    Hi Burd,
    It works well on an iPAQ hx210 WM6.0 with this code.
    To rule out all odds, please make sure that you have
    assigned a 256 color icon in File/Chose Icon:

    For the device you won't even need the Formlib.dll

    On a bad note, this does not show the icon in the tray
    of an iPAQ h2100 running PPC 2003. If you tap on the
    place in the tray where it is supposed to be then the
    program comes up again, though.

    Sub App_Start
      ni.Version580andAbove = 
    true 'del for optimized compiler
    End Sub

    Sub ni_Click
    End Sub
  18. burd27

    burd27 Member Licensed User

    Thanks Alfcen for your reply.

    In essence your code is the same as mine. What I have discovered is that if I "Optimize Compile" it, it works fine and the Icon appears. If I compile it "standard" it doesn't appear, nor does the program fire up when you "click" the spot where the icon should have been.

    I am running B4P 6.05 on the device, so I have tried the "ni.Version6andAbove = True", but it makes no difference to the above findings. (Which I would suspect as "True" is the default value.)

    So now if I optimize compile it, then all is fine. But the little problem that I have at the moment, is that the application that I wanted to use the "ni" on, also uses the Calendar control, which for the time being is not compatible at all with Optimized Compile. (Although, I do believe that Erel may be working on that one for a future release. I wait in hope!) : )

    Thanks again.
  19. miataman

    miataman Member Licensed User

    I'm running sample Test3.Exe and error :

    "error CS1501: aucune surcharge pour la méthode 'GetControlStringOrRef' ne prends pas d'argument '0'
    line number 6
    line ni.New1

    ???? my version 4PPC is 6.30
  20. miataman

    miataman Member Licensed User

    it's OK with !
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice