I want to have a little bubble of text show up in the Windows Taskbar (just like FireFox does when it tells me there's a new version every couple of hours) when my application, running in the background, has something to tell me.
NotifyIcon looks like just what I want.
I look at Microsoft's WPF "documentation" and it tells me that NotifyIcon isn't part of WPF, but to go ahead and use the NotifyIcon of .Net. A little more hunting around gets me a code snippet. So I apply my transliteration "skills" and make a Dialog version...
Code: Select all
foo w
⎕USING←,⊂'System.Windows.Forms,System.Windows.Forms.dll'
⎕USING,←⊂'System.Drawing,system.drawing.dll'
n←⎕NEW NotifyIcon ⍬
n.BalloonTipText←'Hidihi'
n.Text←'Hodiho'
n.NotifyIcon←⎕NEW Icon(⊂w)
n.Visible←1
n.ShowBalloonTip 3000
⍝ MSDN sample code below -----------------------------------------------------
⍝ NotifyIcon notifyIcon = new NotifyIcon(); // Declaration
⍝ this.notifyIcon.BalloonTipText = "Hello, NotifyIcon!"; // Text of BalloonTip
⍝ this.notifyIcon.Text = "Hello, NotifyIcon!"; // ToolTip of NotifyIcon
⍝ this.notifyIcon.Icon = new System.Drawing.Icon("NotifyIcon.ico"); // Shown Icon
⍝ this.notifyIcon.Visible = true;
⍝ this.notifyIcon.ShowBalloonTip(1000); // Shows BalloonTip
The idea being to feed it the name of an icon file as argument, verify that it's working then transfer to my application (and pump a bit of writeup into my "how to use WPF from Dyalog" pages).
But - nothing happens. It seems to run - if I deliberately introduce stupid errors I get the expected failures. So it all seems legitimate. But I don't get to see a TaskBar icon and I don't see any bubbling text.
Makes me think that - once again - the bleeding obvious has escaped me.
Environment - 64-bit Windows 7 and 64-bit Dyalog 13.0. I've tried various Taskbar properties - like turning off autohide - seems to make no difference.