NotifyIcon anda change ico

  • Thread starter Thread starter RobertoCL
  • Start date Start date
R

RobertoCL

Hello

I test a lot of the example, but i can't change de icon in systray.
The last that i to try, but don't work:

Stream stream =
Assembly.GetExecutingAssembly().GetManifestResourceStream("BB.ico");
Icon icon = new Icon(icon);
imageList1.Images.Add(icon);


Now i want try with OpenNETCF. How i can managed or use IconHandle?

Any comment are welcome, please!!
 
RobertoCL said:
Hello

I test a lot of the example, but i can't change de icon in systray.
The last that i to try, but don't work:

Stream stream =
Assembly.GetExecutingAssembly().GetManifestResourceStream("BB.ico");
Icon icon = new Icon(icon);
imageList1.Images.Add(icon);


Now i want try with OpenNETCF. How i can managed or use IconHandle?

I have res.dll with two Icon (IDs 101 and 102) and as embedded resource.
I try to load

hIcon = LoadIcon(GetModuleHandle("res.dll"), "#101")
notifyIcon.IconHandle = (hIcon)

I don't know what is wrong.

I am newbie in .NET :-/
 
What hIcon did you get back? If you got NULL, then I don't think you should
be surprised if things don't work!

Paul T.
 
Paul G. Tobey said:
What hIcon did you get back? If you got NULL, then I don't think you
should be surprised if things don't work!

Paul T.

Dim hIcon As IntPtr
hIcon = LoadIcon(GetModuleHandle("res.dll"), "#101")
Well, yes, hIcon = 0 :-/

I search IconHandle in
http://groups.google.com/group/microsoft.public.dotnet.framework.compactframework,
but the information that seems is enough, perhaps it is a relatively new
function. The key is how convert res.dll in IntPtr.

Thanks
--
RCL

 
In my native code applications, I use LoadImage() to get the icon...

Paul T.

RobertoCL said:
Paul G. Tobey said:
What hIcon did you get back? If you got NULL, then I don't think you
should be surprised if things don't work!

Paul T.

Dim hIcon As IntPtr
hIcon = LoadIcon(GetModuleHandle("res.dll"), "#101")
Well, yes, hIcon = 0 :-/

I search IconHandle in
http://groups.google.com/group/microsoft.public.dotnet.framework.compactframework,
but the information that seems is enough, perhaps it is a relatively new
function. The key is how convert res.dll in IntPtr.

Thanks
 
Back
Top