Application Icon in Control Box

  • Thread starter Thread starter Paul Stork
  • Start date Start date
P

Paul Stork

I'm stumped. I'm trying to replace the default ICON on a vb .net compact
Framework form. I've got a 32X32 .ico file that has the graphic I want to
use. I've tried several versions at different color depths. All show fine in
designer when I set the ICON property of the form. But none of them show
correctly when I run the App.

I've also tried setting the ICON for the form in code by loading the .ico as
an embedded resource. It loads fine and the form says that the icon
property is pointing to the icon when I run debug, but the default icon
still shows in the form. Any ideas? I've done this in regular VB, but can't
get it to work in Compact Framework.

--
Paul Papanek Stork
MBA, CTT+, MCT, MCSE+I, MCSA, MCAD, MCDBA
Solutient of Ohio, INC.
email: pstork <<at>> solutient.com
visit ME at: <<http://info.cwru.edu/pstork/>>
 
Form icons are 16x16, so you need to add the 16x16 version to your ICO file.

-Chris
 
Actually, There's already a 16X16 included in the icon file to be used on
the StartMenu. But I pulled that out to a seperate .ico file and still
can't get it to show in the control box of the form. It's fine during
design mode, but the default icon is all that shows at runtime.

--
Paul Papanek Stork
MBA, CTT+, MCT, MCSE+I, MCSA, MCAD, MCDBA
Solutient of Ohio, INC.
email: pstork <<at>> solutient.com
visit ME at: <<http://info.cwru.edu/pstork/>>
 
Hmm. I wonder if you could try sending WM_SETICON message with the icon
handle
 
I haven't tried that. However, I did notice that none of the programs I
looked at on my Pocket PC now have their own Icons. They all use the start
button icon. Even things like Pocket Word and Pocket Excel. I'm beginning
to think that it's not possible short of overriding the paint event.

--
Paul Papanek Stork
MBA, CTT+, MCT, MCSE+I, MCSA, MCAD, MCDBA
Solutient of Ohio, INC.
email: pstork <<at>> solutient.com
visit ME at: <<http://info.cwru.edu/pstork/>>
 
*now* it's coming to me what you're saying! Under PPC, the Forms don't
actually have an icon - the form itself has no caption area (use Spy++ or
GetWindowLong(GWL_STYLE...) if you don't believe me). The title bar and
icon are a separate element in PPC, and the icon *is* the "start menu". I
don't believe it's (easily) changeable.

-Chris
 
I agree. That's the conclusion that I'm coming to. what I don't understand
is why the Icon property is still available on the form at both design and
runtime if it can't be used, Lots of other properties deprecated in
Compact Framework. Why not Icon?

--
Paul Papanek Stork
MBA, CTT+, MCT, MCSE+I, MCSA, MCAD, MCDBA
Solutient of Ohio, INC.
email: pstork <<at>> att.net
visit ME at: <<http://info.cwru.edu/pstork/>>
 
Probably because non-PPC devices don't have this "feature" - remember .NETCF
!= PPC

-Chris
 
You're right. I get so focused on PPC that I tend to forget that CE is
built for a wider embedded community. Thanks.

--
Paul Papanek Stork
MBA, CTT+, MCT, MCSE+I, MCSA, MCAD, MCDBA
Solutient of Ohio, INC.
email: pstork <<at>> solutient.com
visit ME at: <<http://info.cwru.edu/pstork/>>
 
Back
Top