dudefromthebronx
New member
- Joined
- Jan 31, 2012
- Messages
- 4
- Programming Experience
- Beginner
Private animated As New Bitmap("animated.gif") Private frameindex As Integer Private framecount As Integer = animated.GetFrameCount(Imaging.FrameDimension.Time) Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick frameindex = If(frameindex = framecount - 1, 0, frameindex + 1) animated.SelectActiveFrame(Imaging.FrameDimension.Time, frameindex) Me.Icon.Dispose() Me.Icon = Icon.FromHandle(animated.GetHicon) End Sub
Public Class FormWithElaborateIcon
Inherits Form
Protected Overrides Sub OnPaint(e As PaintEventArgs)
MyBase.OnPaint(e)
e.Graphics.DrawImage(ImageObject, x, y, Width, Height)
End Sub
End Class
Or subclass a form object and as stated draw an image on top of the regular icon...
VB.NET:Public Class FormWithElaborateIcon Inherits Form Protected Overrides Sub OnPaint(e As PaintEventArgs) MyBase.OnPaint(e) e.Graphics.DrawImage(ImageObject, x, y, Width, Height) End Sub End Class
Combine that with the previous tidbit form John and you can animate it.