A
Anony
Hi All,
I have two icons:
Private micoIcon1 As New
System.Drawing.Icon(System.IO.Path.Combine(Application.StartupPath,
"Icon1.ico"))
Private micoIcon2 As New
System.Drawing.Icon(System.IO.Path.Combine(Application.StartupPath,
"Icon2.ico"))
I want switch them:
Private Sub SwitchIcons()
With sbpIcon 'this is the StatusBar Panel name
If .Icon = micoIcon1
.Icon = micoIcon2
Else
.Icon = micoIcon1
End If
End With
End Sub
This works in case of SysTray icon, but not for StatusBar Panel (always
remain micoIcon1). I think I missed something to use the StatusBar Panel.
Can someone tell what's wrong or missed?
Thanks for any tips,
Anony
I have two icons:
Private micoIcon1 As New
System.Drawing.Icon(System.IO.Path.Combine(Application.StartupPath,
"Icon1.ico"))
Private micoIcon2 As New
System.Drawing.Icon(System.IO.Path.Combine(Application.StartupPath,
"Icon2.ico"))
I want switch them:
Private Sub SwitchIcons()
With sbpIcon 'this is the StatusBar Panel name
If .Icon = micoIcon1
.Icon = micoIcon2
Else
.Icon = micoIcon1
End If
End With
End Sub
This works in case of SysTray icon, but not for StatusBar Panel (always
remain micoIcon1). I think I missed something to use the StatusBar Panel.
Can someone tell what's wrong or missed?
Thanks for any tips,
Anony