As Object)
MyBase.OnInsert(index, value)
End Sub
Default ReadOnly Property Item()Property Item()Property Item()Property Item(ByVal Index As Integer) As PopupNotifier
Get
Return DirectCast(List(Index), PopupNotifier)
End Get
End Property
Public Function Add()Function Add()Function Add()Function Add(ByVal value As PopupNotifier) As PopupNotifier
List.Add(value)
Return value
End Function
Public Function Contains()Function Contains()Function Contains()Function Contains(ByVal value As PopupNotifier) As Boolean
Return List.Contains(value)
End Function
Public Sub Remove()Sub Remove()Sub Remove()Sub Remove(ByVal value As PopupNotifier)
List.Remove(value)
End Sub
Public Function IndexOf()Function IndexOf()Function IndexOf()Function IndexOf(ByVal value As PopupNotifier) As Integer
Return List.IndexOf(value)
End Function
Public Shadows Sub Clear()Sub Clear()Sub Clear()Sub Clear()
MyBase.Clear()
End Sub
Sub Popup()Sub Popup()Sub Popup()Sub Popup()
For Each Item As PopupNotifier In List
Item.Popup(List.IndexOf(Item))
Next
Clear()
End Sub
End Class
Dim colPopupNotifiers As New PopupNotifierCollection
Dim pnNotifier1 As PopupNotifier = New PopupNotifier
Dim pnNotifier2 As PopupNotifier = New PopupNotifier
colPopupNotifiers.Add(pnNotifier1)
colPopupNotifiers.Add(pnNotifier2)
colPopupNotifiers.Popup()
Popup()会调用PopupNotifier的Popup(),PopupNotifier要做一些改变:
加入Private iOffset As Integer = 0
在Popup()中:
Sub Popup()Sub Popup(Optional ByVal Number As Integer = 0)
tmWait.Interval = ShowDelay
fPopup.Size = Size
fPopup.Opacity = 0
iOffset = (Number * fPopup.Size.Height) + (Number * 5)
fPopup.Location = New Point(Screen.PrimaryScreen.WorkingArea.Right - fPopup.Size.Width - 1, Screen.PrimaryScreen.WorkingArea.Bottom - iOffset)
fPopup.Show()
tmAnimation.Start()
End Sub
在tmAnimation_Tick()中:
If fPopup.Top + fPopup.Height < Screen.PrimaryScreen.WorkingArea.Bottom - iOffset
If fPopup.Top > Screen.PrimaryScreen.WorkingArea.Bottom - iOffset
如何隐藏任务栏上的小图标
在New中 加一句ShowInTaskbar = False.