ComMÉDIA
for Windows CE HomeSource Code Form Icon ActiveX Controls



References


Windows CE
Web Community



[Prev] [Random] [Next]
[List Sites] [Next 5]

VBCE Form Icons Test.zip   (12k)

Wouldn't you like to see a small icon before the caption of your VBCE form on the toolbar? This example shows you how to do that in three different ways.

  1. The first method uses the function "SetFormIconFromAppTitle" which extracts the icon from the default icon assigned to a file whose name is at the Application Title project property. This file does not really have to exist: only the extension is of importance (Why? Check SHGFI_USEFILEATTRIBUTES flag on the call to SHGetFileInfo).and completely fills the form with this image. If not available on the device, the program will ask you to provide another one.

    On the example, "Project => Properties => Make" you will see that the Application Title has been filled with "FormIcons.vb". So, the default icon for ".vb" files will be used. Try to change this to "x.bmp" and run the example again...

  2. We may also extract the icon from an existing DLL or EXE file. Try that button. If you have "calc " on your device you'll see that the form will change its icon to a small calculator. You may also test it with other DLL/EXE's.

  3. This is, probably the most interesting method. If you build your own Icons and store them on a "Resource Only" DLL, you can select which one to use extracting it from that DLL ("fiIcons.dll" on this example) using a sequential negative number starting at -101. The first icon on the DLL may also be referenced as 0.

Try the example with the 3 Id's provided.

To build icon DLL files you may use VC++ with the CE Toolkit or a special tool like "VBCE Icons Tool" available here.

 

The file "ifIcons.dll" on this directory has been built for a MIPS device. To use this example on a device with an SH3 processor, rename the file "ifIcons.SH3.dll" to "ifIcons.dll". 

The same way, if you want to test it on the Emulator, rename the file "ifIcons.X86.dll" to "ifIcons.dll".

This file, "ifIcons.dll", has been added as a RelatedDoc to the project so it will also be copied (to the root directory together with the .vb file) when you run the project.

Enjoy,
ComMedia, Lda.



[ Home ] [ Source Code ] [ Articles ] [ Download ] [ Support ]
[ VBCE Icons Tool ] [ ActiveX Controls ]

Copyright ComMedia 2000-2003. All rights reserved.
Microsoft, Windows CE, and Visual Basic are registered trademarks of Microsoft Corporation.

Windows CE ActiveX Controls specifically designed in ATL for eVB.

Date Time
Month Calendar
Progress Bar
Popup Menu
Tray Icon
Locale
Settings
RAS Dial
RAS Entries
RAS PPTP

>> Try them! <<


Icons Tool

The Evaluation version of the
VBCE Icons Tool
performs exactly as the registered version but draws all Icons over a grid with scrambled colors .

Check the details.

VBCE UDT's

"...to extend the intrinsic VB functionality with extra functions provided by the MS Windows Operating System..."

more...