Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Animated form icons

Total Hit ( 4021)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


You can add a professional touch to your apps by showing an animated icon when the main form is minimized. To achieve this effect, prepare an array of Image controls, each one containing the icons that make up the animation, then add a Timer control, with the Enabled property set to True and the Interval property set to 250 (or any other value suited to the particular animation effected). Then add the following code:

Click here to copy the following block
Sub Timer1_Timer()
  Const NUM_ICONS = 4
  Static iconIndex As Integer

  If Form1.WindowState = vbMinimized Then
    Form1.Icon = Image1(iconIndex).Picture
    iconIndex = (iconIndex + 1) Mod NUM_ICONS
  End If
End Sub

It is important that all the images loaded into Image controls are ICO images; if you try to assign a standard BMP file to the Icon property a runtime error occurs.



Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.