Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
ちょっと知っておくと面白いかも知れません。
Using the Microsoft .NET Compact Framework MessageWindow Class
カギになるのは、このアイコンを表示するために、Microsoft.WindowsCE.Forms.MessageWindow を継承したクラスを作ることにあります。
internal class WindowSink : Microsoft.WindowsCE.Forms.MessageWindow
{
private int m_uID = 0;
private NotifyIcon notifyIcon;
protected override void WndProc(ref Message msg) { ~ }
}
表示管理は Shell_NotifyIcon メソッドですね。
private void TrayMessage(IntPtr hwnd, int dwMessage, uint uID, IntPtr
hIcon)
{
NOTIFYICONDATA notdata = new NOTIFYICONDATA();
notdata.cbSize = 152;
notdata.hIcon = hIcon;
notdata.hWnd = hwnd;
notdata.uCallbackMessage = WM_NOTIFY_TRAY;
notdata.uFlags = NIF_MESSAGE | NIF_ICON;
notdata.uID = uID;
Shell_NotifyIcon(dwMessage, ref notdata);
}
また、えらく懐かしい画面ですが、この辺りまで互換性があるというのもうれしいやら悲しいやら。
Comments
- Anonymous
February 20, 2008
PingBack from http://www.biosensorab.org/2008/02/20/net-compact-framework-%e3%81%a7%e9%80%9a%e7%9f%a5%e3%82%a2%e3%82%a4%e3%82%b3%e3%83%b3/