jagg vill skapa notifyIcon dynamiskt. <code>Skappa notifyIcon dynamiskt
jag har en foreach loop för varej var skall det skapas en notifyIcon Sv: Skappa notifyIcon dynamiskt
Private components As System.ComponentModel.IContainer
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.components = New System.ComponentModel.Container
Dim i As Integer
For i = 0 To 10
Dim NotifyIcon1 As New System.Windows.Forms.NotifyIcon(Me.components)
NotifyIcon1.Text = "NotifyIcon" & i.ToString
NotifyIcon1.Visible = True
Dim a As New Icon("Sökväg till ikonen")
NotifyIcon1.Icon = a
Next
End Sub
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
</code>
Mvh
Peter