472,328 Members | 1,728 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

changing icon in statusbar

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. once i clic on online its icon
changes to connecticon (assume its there) and whenever i click on offline,
its icon changes to disconnection (assume this is also there).

now the problem is i have kept one icon for connection (ie when its online -
by default using windows property) now i want to change its icon in runtime.
can i see how it can be changed?

and in the 2nd panel
thanks

K.
Nov 21 '05 #1
14 2031
"Kishan Hathiwala" <ki****@hathiwala.fateback.com> schrieb:
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. once i clic on online its icon
changes to connecticon (assume its there) and whenever i click on offline,
its icon changes to disconnection (assume this is also there).

now the problem is i have kept one icon for connection (ie when its
online -
by default using windows property) now i want to change its icon in
runtime.


<URL:http://www.google.de/groups?selm=OIoCi89qEHA.3988%40tk2msftngp13.phx.gb l>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #2
"Kishan Hathiwala" <ki****@hathiwala.fateback.com> schrieb:
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. once i clic on online its icon
changes to connecticon (assume its there) and whenever i click on offline,
its icon changes to disconnection (assume this is also there).

now the problem is i have kept one icon for connection (ie when its
online -
by default using windows property) now i want to change its icon in
runtime.


<URL:http://www.google.de/groups?selm=OIoCi89qEHA.3988%40tk2msftngp13.phx.gb l>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #3
Hi Kishan

The key is in the event object on the Status Bar Panel click event handler.

This code swaps the form's icon and the status bar icon when you click on it:

HTH

Nigel

Private Sub StatusBar1_PanelClick(ByVal sender As System.Object, ByVal e
As System.Windows.Forms.StatusBarPanelClickEventArgs) Handles
StatusBar1.PanelClick
Dim i As Icon = e.StatusBarPanel.Icon
e.StatusBarPanel.Icon = Me.Icon
Me.Icon = i
End Sub

"Kishan Hathiwala" wrote:
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. once i clic on online its icon
changes to connecticon (assume its there) and whenever i click on offline,
its icon changes to disconnection (assume this is also there).

now the problem is i have kept one icon for connection (ie when its online -
by default using windows property) now i want to change its icon in runtime.
can i see how it can be changed?

and in the 2nd panel
thanks

K.

Nov 21 '05 #4
Hi Kishan

The key is in the event object on the Status Bar Panel click event handler.

This code swaps the form's icon and the status bar icon when you click on it:

HTH

Nigel

Private Sub StatusBar1_PanelClick(ByVal sender As System.Object, ByVal e
As System.Windows.Forms.StatusBarPanelClickEventArgs) Handles
StatusBar1.PanelClick
Dim i As Icon = e.StatusBarPanel.Icon
e.StatusBarPanel.Icon = Me.Icon
Me.Icon = i
End Sub

"Kishan Hathiwala" wrote:
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. once i clic on online its icon
changes to connecticon (assume its there) and whenever i click on offline,
its icon changes to disconnection (assume this is also there).

now the problem is i have kept one icon for connection (ie when its online -
by default using windows property) now i want to change its icon in runtime.
can i see how it can be changed?

and in the 2nd panel
thanks

K.

Nov 21 '05 #5
Greets

the link you provided is not working

K
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:O9**************@tk2msftngp13.phx.gbl...
"Kishan Hathiwala" <ki****@hathiwala.fateback.com> schrieb:
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. once i clic on online its icon
changes to connecticon (assume its there) and whenever i click on offline, its icon changes to disconnection (assume this is also there).

now the problem is i have kept one icon for connection (ie when its
online -
by default using windows property) now i want to change its icon in
runtime.

<URL:http://www.google.de/groups?selm=OIo...ftngp13.phx.gb
l>
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #6
Greets

the link you provided is not working

K
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:O9**************@tk2msftngp13.phx.gbl...
"Kishan Hathiwala" <ki****@hathiwala.fateback.com> schrieb:
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. once i clic on online its icon
changes to connecticon (assume its there) and whenever i click on offline, its icon changes to disconnection (assume this is also there).

now the problem is i have kept one icon for connection (ie when its
online -
by default using windows property) now i want to change its icon in
runtime.

<URL:http://www.google.de/groups?selm=OIo...ftngp13.phx.gb
l>
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #7
the thing is the icon is not of form's icon. its outsided icon

"Nigel Armstrong" <Ni************@discussions.microsoft.com> wrote in
message news:60**********************************@microsof t.com...
Hi Kishan

The key is in the event object on the Status Bar Panel click event handler.
This code swaps the form's icon and the status bar icon when you click on it:
HTH

Nigel

Private Sub StatusBar1_PanelClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.StatusBarPanelClickEventArgs) Handles
StatusBar1.PanelClick
Dim i As Icon = e.StatusBarPanel.Icon
e.StatusBarPanel.Icon = Me.Icon
Me.Icon = i
End Sub

"Kishan Hathiwala" wrote:
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. once i clic on online its icon
changes to connecticon (assume its there) and whenever i click on offline, its icon changes to disconnection (assume this is also there).

now the problem is i have kept one icon for connection (ie when its online - by default using windows property) now i want to change its icon in runtime. can i see how it can be changed?

and in the 2nd panel
thanks

K.

Nov 21 '05 #8
the thing is the icon is not of form's icon. its outsided icon

"Nigel Armstrong" <Ni************@discussions.microsoft.com> wrote in
message news:60**********************************@microsof t.com...
Hi Kishan

The key is in the event object on the Status Bar Panel click event handler.
This code swaps the form's icon and the status bar icon when you click on it:
HTH

Nigel

Private Sub StatusBar1_PanelClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.StatusBarPanelClickEventArgs) Handles
StatusBar1.PanelClick
Dim i As Icon = e.StatusBarPanel.Icon
e.StatusBarPanel.Icon = Me.Icon
Me.Icon = i
End Sub

"Kishan Hathiwala" wrote:
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. once i clic on online its icon
changes to connecticon (assume its there) and whenever i click on offline, its icon changes to disconnection (assume this is also there).

now the problem is i have kept one icon for connection (ie when its online - by default using windows property) now i want to change its icon in runtime. can i see how it can be changed?

and in the 2nd panel
thanks

K.

Nov 21 '05 #9
"Kishan Hathiwala" <ki****@hathiwala.fateback.com> schrieb:
the link you provided is not working


Maybe you'll have to remove the '<URL:'...'>' markup in order to make it
work...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #10
"Kishan Hathiwala" <ki****@hathiwala.fateback.com> schrieb:
the link you provided is not working


Maybe you'll have to remove the '<URL:'...'>' markup in order to make it
work...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #11
Kishan,
the thing is the icon is not of form's icon. its outsided icon
I realise that...I thought you might be able to look at the constructor for
the Icon class to do the rest. For example, if you want to load from an Icon
file C:\test.ico, then you would create your icon as:

Dim i1 As New Icon("C:\test.ico")

There are other options as well, such as from resource files etc...

HTH

Nigel Armstrong

"Kishan Hathiwala" wrote:
the thing is the icon is not of form's icon. its outsided icon

"Nigel Armstrong" <Ni************@discussions.microsoft.com> wrote in
message news:60**********************************@microsof t.com...
Hi Kishan

The key is in the event object on the Status Bar Panel click event

handler.

This code swaps the form's icon and the status bar icon when you click on

it:

HTH

Nigel

Private Sub StatusBar1_PanelClick(ByVal sender As System.Object, ByVal

e
As System.Windows.Forms.StatusBarPanelClickEventArgs) Handles
StatusBar1.PanelClick
Dim i As Icon = e.StatusBarPanel.Icon
e.StatusBarPanel.Icon = Me.Icon
Me.Icon = i
End Sub

"Kishan Hathiwala" wrote:
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. once i clic on online its icon
changes to connecticon (assume its there) and whenever i click on offline, its icon changes to disconnection (assume this is also there).

now the problem is i have kept one icon for connection (ie when its online - by default using windows property) now i want to change its icon in runtime. can i see how it can be changed?

and in the 2nd panel
thanks

K.


Nov 21 '05 #12
Kishan,
the thing is the icon is not of form's icon. its outsided icon
I realise that...I thought you might be able to look at the constructor for
the Icon class to do the rest. For example, if you want to load from an Icon
file C:\test.ico, then you would create your icon as:

Dim i1 As New Icon("C:\test.ico")

There are other options as well, such as from resource files etc...

HTH

Nigel Armstrong

"Kishan Hathiwala" wrote:
the thing is the icon is not of form's icon. its outsided icon

"Nigel Armstrong" <Ni************@discussions.microsoft.com> wrote in
message news:60**********************************@microsof t.com...
Hi Kishan

The key is in the event object on the Status Bar Panel click event

handler.

This code swaps the form's icon and the status bar icon when you click on

it:

HTH

Nigel

Private Sub StatusBar1_PanelClick(ByVal sender As System.Object, ByVal

e
As System.Windows.Forms.StatusBarPanelClickEventArgs) Handles
StatusBar1.PanelClick
Dim i As Icon = e.StatusBarPanel.Icon
e.StatusBarPanel.Icon = Me.Icon
Me.Icon = i
End Sub

"Kishan Hathiwala" wrote:
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. once i clic on online its icon
changes to connecticon (assume its there) and whenever i click on offline, its icon changes to disconnection (assume this is also there).

now the problem is i have kept one icon for connection (ie when its online - by default using windows property) now i want to change its icon in runtime. can i see how it can be changed?

and in the 2nd panel
thanks

K.


Nov 21 '05 #13
can you just provide me sample code, if possible

"Nigel Armstrong" <Ni************@discussions.microsoft.com> wrote in
message news:DE**********************************@microsof t.com...
Kishan,
the thing is the icon is not of form's icon. its outsided icon
I realise that...I thought you might be able to look at the constructor

for the Icon class to do the rest. For example, if you want to load from an Icon file C:\test.ico, then you would create your icon as:

Dim i1 As New Icon("C:\test.ico")

There are other options as well, such as from resource files etc...

HTH

Nigel Armstrong

"Kishan Hathiwala" wrote:
the thing is the icon is not of form's icon. its outsided icon

"Nigel Armstrong" <Ni************@discussions.microsoft.com> wrote in
message news:60**********************************@microsof t.com...
Hi Kishan

The key is in the event object on the Status Bar Panel click event

handler.

This code swaps the form's icon and the status bar icon when you click on
it:

HTH

Nigel

Private Sub StatusBar1_PanelClick(ByVal sender As System.Object,
ByVal e
As System.Windows.Forms.StatusBarPanelClickEventArgs) Handles
StatusBar1.PanelClick
Dim i As Icon = e.StatusBarPanel.Icon
e.StatusBarPanel.Icon = Me.Icon
Me.Icon = i
End Sub

"Kishan Hathiwala" wrote:

> 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. once i clic on online its

icon > changes to connecticon (assume its there) and whenever i click on

offline,
> its icon changes to disconnection (assume this is also there).
>
> now the problem is i have kept one icon for connection (ie when its

online -
> by default using windows property) now i want to change its icon in

runtime.
> can i see how it can be changed?
>
> and in the 2nd panel
> thanks
>
> K.
>
>
>


Nov 21 '05 #14
can you just provide me sample code, if possible

"Nigel Armstrong" <Ni************@discussions.microsoft.com> wrote in
message news:DE**********************************@microsof t.com...
Kishan,
the thing is the icon is not of form's icon. its outsided icon
I realise that...I thought you might be able to look at the constructor

for the Icon class to do the rest. For example, if you want to load from an Icon file C:\test.ico, then you would create your icon as:

Dim i1 As New Icon("C:\test.ico")

There are other options as well, such as from resource files etc...

HTH

Nigel Armstrong

"Kishan Hathiwala" wrote:
the thing is the icon is not of form's icon. its outsided icon

"Nigel Armstrong" <Ni************@discussions.microsoft.com> wrote in
message news:60**********************************@microsof t.com...
Hi Kishan

The key is in the event object on the Status Bar Panel click event

handler.

This code swaps the form's icon and the status bar icon when you click on
it:

HTH

Nigel

Private Sub StatusBar1_PanelClick(ByVal sender As System.Object,
ByVal e
As System.Windows.Forms.StatusBarPanelClickEventArgs) Handles
StatusBar1.PanelClick
Dim i As Icon = e.StatusBarPanel.Icon
e.StatusBarPanel.Icon = Me.Icon
Me.Icon = i
End Sub

"Kishan Hathiwala" wrote:

> 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. once i clic on online its

icon > changes to connecticon (assume its there) and whenever i click on

offline,
> its icon changes to disconnection (assume this is also there).
>
> now the problem is i have kept one icon for connection (ie when its

online -
> by default using windows property) now i want to change its icon in

runtime.
> can i see how it can be changed?
>
> and in the 2nd panel
> thanks
>
> K.
>
>
>


Nov 21 '05 #15

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

Similar topics

1
by: Ahmet | last post by:
In my application, I have statusbar on which i show icons. On some cases, I have to change icon of my statusbar to show different messages on...
1
by: Brahm | last post by:
Hello, I have an application with a main class subclassing the System.Windows.Form and i changed the Icon setting for the application to point to...
3
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 ...
6
by: Anony | last post by:
Hi All, I have two icons: Private micoIcon1 As New System.Drawing.Icon(System.IO.Path.Combine(Application.StartupPath, "Icon1.ico")) Private...
0
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...
10
by: Flashster | last post by:
How do I put a custom animated icon on the status bar of a form? I have an animated icon file called icon.ani, and I've tried getting...
2
by: reidarT | last post by:
Is it possible to show icon on statusbar, when my application is opened. (Not on taskbar, but on the right side of the 'bottombar') reidarT
4
by: weg22 | last post by:
Hi all, I'm developing a Visual Basic 2005 application to communicate with an I2C device. I recently decided to add an i2c status bar. The...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
1
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...

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.