更改状态栏中的图标 [英] changing icon in statusbar
问题描述
嗨
我在表单中保留了一个状态栏,其中的panel = true。总共有3
小组。每当我点击第3个面板时,会出现一个菜单,显示在线和
离线,并且一次启用。一旦我在网上点击它的图标
更改为connecticon(假设它在那里),每当我点击离线时,
它的图标变为断开连接(假设这也在那里) 。
现在问题是我保留了一个连接图标(即当它在线 -
默认使用windows属性)现在我想改变它的运行时的图标。
我能看到它是如何改变的吗?
和第二个面板
谢谢
K.
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.
推荐答案
" Kishan Hathiwala" <き**** @ hathiwala.fateback.com> schrieb:
"Kishan Hathiwala" <ki****@hathiwala.fateback.com> schrieb:
我在表格中保留了一个状态栏,其中的panel = true。总共有3个面板。每当我点击第3个面板时,会出现一个菜单,显示在线状态和/或离线状态,并且一次启用。一旦我在网上点击它的图标
更改为connecticon(假设它在那里),每当我点击离线时,
它的图标变为断开连接(假设这也在那里)。
>现在的问题是我保留了一个连接图标(即,当它在线 -
默认情况下使用windows属性)现在我想在运行时更改其图标。
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/>
<URL:http://www.google.de/groups?selm=OIoCi89qEHA.3988%40tk2msftngp13.phx.gb l>
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
" Kishan Hathiwala" <き**** @ hathiwala.fateback.com> schrieb:
"Kishan Hathiwala" <ki****@hathiwala.fateback.com> schrieb:
我在表格中保留了一个状态栏,其中的panel = true。总共有3个面板。每当我点击第3个面板时,会出现一个菜单,显示在线状态和/或离线状态,并且一次启用。一旦我在网上点击它的图标
更改为connecticon(假设它在那里),每当我点击离线时,
它的图标变为断开连接(假设这也在那里)。
>现在的问题是我保留了一个连接图标(即,当它在线 -
默认情况下使用windows属性)现在我想在运行时更改其图标。
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/>
<URL:http://www.google.de/groups?selm=OIoCi89qEHA.3988%40tk2msftngp13.phx.gb l>
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Hi Kishan
键位于状态栏面板单击事件处理程序的事件对象中。
>
当您点击它时,此代码交换表单的图标和状态栏图标:
HTH
Nigel
Private Sub StatusBar1_PanelClick(ByVal sender As System.Object,ByVal e
As System.Windows。 Forms.StatusBarPanelClickEventArgs)句柄
StatusBar1.PanelClick
Dim i As Icon = e.StatusBarPanel.Icon
e.StatusBarPanel.Icon = Me。 Icon
Me.Icon = i
End Sub
Kishan Hathiwala写道:
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:
嗨
我在表格中保留了一个状态栏,其中的面板为true = true。总共有3个面板。每当我点击第3个面板时,会出现一个显示在线和离线的菜单,并且一次启用。一旦我在网上点击它的图标
更改为connecticon(假设它在那里),每当我点击离线时,
它的图标变为断开连接(假设这也在那里)。
>现在问题是我保留了一个连接图标(即当它在线时 - 默认情况下使用windows属性)现在我想在运行时更改它的图标。
我能看到它是如何改变的?
在第2小组中
谢谢
K.
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.
这篇关于更改状态栏中的图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!