Change icon for NotifyIcon : NotifyIcon « GUI « VB.Net Tutorial

VB.Net Tutorial
1. Language Basics
2. Data Type
3. Operator
4. Statements
5. Date Time
6. Class Module
7. Development
8. Collections
9. Generics
10. Attributes
11. Event
12. Stream File
13. GUI
14. GUI Applications
15. 2D Graphics
16. I18N Internationlization
17. Reflection
18. Regular Expressions
19. Security
20. Socket Network
21. Thread
22. Windows
23. XML
24. Database ADO.net
25. Design Patterns
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
VB.Net Tutorial » GUI » NotifyIcon 
13. 29. 4. Change icon for NotifyIcon
Change icon for NotifyIcon
Imports System.Windows.Forms
Imports System.Drawing
Imports System.Drawing.Drawing2D
public class ChangeNotifyIcon
   public Shared Sub Main
        Application.Run(New Form1)
   End Sub
End class

Public Class Form1
    Private Sub radStop_Click(ByVal sender As Object, ByVal e As System.EventArgsHandles radStop.Click
        nicStatus.Icon = New Icon("1.ico")
    End Sub

    Private Sub radGo_Click(ByVal sender As Object, ByVal e As System.EventArgsHandles radGo.Click
        nicStatus.Icon = New Icon("2.ico")
    End Sub
End Class


<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Public Class Form1
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Me.nicStatus = New System.Windows.Forms.NotifyIcon(Me.components)
        Me.radStop = New System.Windows.Forms.RadioButton
        Me.radGo = New System.Windows.Forms.RadioButton
        Me.SuspendLayout()
        '
        'nicStatus
        '
        Me.nicStatus.Text = "NotifyIcon1"
        Me.nicStatus.Visible = True
        '
        'radStop
        '
        Me.radStop.AutoSize = True
        Me.radStop.Checked = True
        Me.radStop.Location = New System.Drawing.Point(1616)
        Me.radStop.Name = "radStop"
        Me.radStop.Size = New System.Drawing.Size(4317)
        Me.radStop.TabIndex = 0
        Me.radStop.Text = "Stop"
        '
        'radGo
        '
        Me.radGo.AutoSize = True
        Me.radGo.Location = New System.Drawing.Point(11216)
        Me.radGo.Name = "radGo"
        Me.radGo.Size = New System.Drawing.Size(3517)
        Me.radGo.TabIndex = 1
        Me.radGo.TabStop = False
        Me.radGo.Text = "Go"
        '
        'Form1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(292273)
        Me.Controls.Add(Me.radGo)
        Me.Controls.Add(Me.radStop)
        Me.Name = "Form1"
        Me.Text = "UseNotifyIcon"
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
    Friend WithEvents nicStatus As System.Windows.Forms.NotifyIcon
    Friend WithEvents radStop As System.Windows.Forms.RadioButton
    Friend WithEvents radGo As System.Windows.Forms.RadioButton

End Class
13. 29. NotifyIcon
13. 29. 1. NotifyIcon with Popup MenuNotifyIcon with Popup Menu
13. 29. 2. Make NotifyIcon visible
13. 29. 3. NotifyIcon double click event
13. 29. 4. Change icon for NotifyIconChange icon for NotifyIcon
w_w___w._jav__a___2_s__.co_m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.