473,480 Members | 1,855 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Displaying icon in StatusBarPanel

I want to dynamically change the icon displayed in a status bar panel.
I've created the icons in the resource file, app.rc, e.g. IDI_MYICON.
How can I load this icon and display it in the StatusBarPanel?

The auto-generated code does:

this->StatusBarPanel->Icon = (__try_cast<System::Drawing::Icon *
>(resources->GetObject(S"StatusBarPanel.Icon")));
But this loads the icon from form1.resX and the icons I've defined
aren't in there.

TIA,
KK

Jun 22 '07 #1
2 1668
On Jun 22, 6:13 am, kelvin.koo...@googlemail.com wrote:
I want to dynamically change the icon displayed in a status bar panel.
I've created the icons in the resource file, app.rc, e.g. IDI_MYICON.
How can I load this icon and display it in the StatusBarPanel?

The auto-generated code does:

this->StatusBarPanel->Icon = (__try_cast<System::Drawing::Icon *
(resources->GetObject(S"StatusBarPanel.Icon")));

But this loads the icon from form1.resX and the icons I've defined
aren't in there.

TIA,
KK
You can add the Icons into the Form1.Resx file manually in order to
access them through resources->GetObject.

Evan

Jun 23 '07 #2
On 23 Jun, 22:04, ewpat...@gmail.com wrote:
On Jun 22, 6:13 am, kelvin.koo...@googlemail.com wrote:
I want to dynamically change the icon displayed in a status bar panel.
I've created the icons in the resource file, app.rc, e.g. IDI_MYICON.
How can I load this icon and display it in the StatusBarPanel?
The auto-generated code does:
this->StatusBarPanel->Icon = (__try_cast<System::Drawing::Icon *
>(resources->GetObject(S"StatusBarPanel.Icon")));
But this loads the icon from form1.resX and the icons I've defined
aren't in there.
TIA,
KK

You can add the Icons into the Form1.Resx file manually in order to
access them through resources->GetObject.

Evan
Sorry to be an idiot, but how do I add icons to Form1.resX manually?
Do you mean literally cutting and pasting with a text editor?

TIA,
KK

Jun 25 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1175
by: mdb | last post by:
The StatusBarPanel has a property "ToolTipText" that allows you to set the tool tip while the mouse hovers over that particular panel, but there doesn't seem to be a way to control the timing...
0
1157
by: Mike Connery | last post by:
I found a thread in google over this question in this newsgroup. how to convert a imagelist.image to the statusbarpanel.icon? can anybody help me? thanks a lot
3
1901
by: EricJ | last post by:
Hi I'm having trouble getting icons from an imagelist in a statusbar panel. if i load the icons directly it works Dim ico As new Icon("W95MBX03.ICO") statusbarPanel..Icon = ico but if i try...
14
2115
by: Kishan Hathiwala | last post by:
Hi i have kept a statusbar in the form with panels = true. and total there 3 panels. whenever i click on the 3rd panel a menu appears showing online and offline and either is enable at a time....
2
5041
by: Olaf Rabbachin | last post by:
Hi folks, I'd like to notify the user that rows within a datagrid require user-interaction/processing. The RowHeader is visible and wide enough so that the exclamation-mark icon as i.e. the...
7
3363
by: Terry | last post by:
I have a Mainform with a Statusbar. When opening another form or doing some processing I want to display info in the Statusbar of the Mainform. I have read a lot of articles on this & have come up...
1
1838
by: Rich | last post by:
Hello, I have created icons before with icon editor that comes with VS2003 without any issues. Today I created another icon for my VB.Net app. But this .ico file is not displaying the figure...
0
1138
by: Rich | last post by:
Hello, When I create an icon in VB2005 icon editor - 32x32, the figure I draw in the editor is not displaying on the icon file in the solution explorere, in windows explorer, on the exe, or on...
3
2346
by: anniejose | last post by:
I am facing an issue in displaying a calendar popup on click of a calendar icon in one of my JSP pages. In my JSP page I have 3 calendar icons in a horizontally scrollable table. If I click the 1st...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7088
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6741
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6956
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5342
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4783
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4485
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2986
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.