How to add an icon to the command bar?

UncleRonin

Well-known member
Joined
Feb 28, 2006
Messages
230
Location
South Africa
Programming Experience
5-10
I'm developing an app where it runs in the background. What I would like to know is how I could add an icon to the command bar (system tray) on mobile devices? Must I use a specific control?
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,583
Location
Norway
Programming Experience
10+
NotifyIcon component is supported on Windows Mobiles.
 

UncleRonin

Well-known member
Joined
Feb 28, 2006
Messages
230
Location
South Africa
Programming Experience
5-10
Okay, you say supported on Windows Mobile, what about Pocket PC? I've had a look and there is no available component. There is a way to do it but its pretty low level and requires a lot of effort. Could you please tell me how to find the NotifyIcon for Pocket PC?
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,583
Location
Norway
Programming Experience
10+

UncleRonin

Well-known member
Joined
Feb 28, 2006
Messages
230
Location
South Africa
Programming Experience
5-10
According to the documentation in your reference, NotifyIcon is only available with .NET Framework 2.0, not CF at all. The only ways I've found for using an icon on the command bar is through manipulating hooks and that.
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,583
Location
Norway
Programming Experience
10+
Why does it say Windows Mobile for Pocket PC, Windows Mobile for Smartphone is supported, then? Also they changed the versions supported to includee .Net 1.
 

UncleRonin

Well-known member
Joined
Feb 28, 2006
Messages
230
Location
South Africa
Programming Experience
5-10
>_< Then maybe you can show me a sample on how to get it working? I've tried adding a NotifyIcon programmatically to my form through the exact namespace, System.Windows.Forms and NotifyIcon, but it wont let me. In the documentation it says .NET Framework and doesn't include .NET Compact Framework. I dont know, maybe Windows Mobile uses the full framework and not CF. In any case, I'm trying to use CF so any WMobile functionality is of little use.

*scratch* If you can figure out how to use .NET functionality to get add an icon to the command bar you're a genius.
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,583
Location
Norway
Programming Experience
10+
From what I can see mobiles OS is not on the list of supported operating systems for the full framework. So I was under impression that the documentation was referring to CF for these systems (PPC+Smartphone), I don't now understand why these are mentioned at all. A PPC may be running either on Windows Mobile or Windows CE then? (and yours is WinCE I gather) But both these OS can only run Compact Framework? Anyway my initial suggestion about NotifyIcon was only because the full framework documentation said it worked for Mobiles, guess not. Now having a look for Compact framework specific documentation I just about only find this chm class comparison help file that doesn't even open because of default WinXP security settings. I'm not in possession of such device and can't test and work out genious stuff for you here.
 
Top Bottom