Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,580 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,945 people online right now. Registration is fast and FREE... Join Now!




Blinking Text for Beginners

 
Reply to this topicStart new topic

> Blinking Text for Beginners, This will help you to create a cool animation(blinking text) for your

akhileshbc
Group Icon



post 27 Sep, 2008 - 08:59 PM
Post #1


Hi guys,
Most of you had created many programs for various purpose. But have you ever thought of some animation in your program..smile.gif

Here I am going to mention a small tutorial on creating a blinking text effect. It is for pure beginners.

First of all open the Visual Basic using Start>Programs>Microsoft Visual Studio>Visual Basic 6.0.

Then select Standard EXE and click open.
You will get a blank Form.

From the toolbox(in left side), select Command Button and create two buttons in your form(say, Command1 and Command2).
Also, create a Timer in your form(say, Timer1)

Then open the code window(View menu> View Code).
Then write the code as below:
vb
Private Sub Command1_Click()
Timer1.Interval = 100 'interval of the timer
Timer1.Enabled = True 'starting the animation
Label1.Caption = "Welcome" 'text to display
End Sub

Private Sub Command2_Click()
Timer1.Enabled = False 'stopping the animation
End Sub

Private Sub Form_Load()
Timer1.Enabled = False 'disabling the animation on loading the form
End Sub

Private Sub Timer1_Timer()
If Label1.Visible = True Then 'checking whether it is visible
Label1.Visible = False 'if visible then, make it invisible
ElseIf Label1.Visible = False Then 'checking whether it is invisible
Label1.Visible = True 'if invisible then, make it visible
End If
End Sub

I had included most of the comments in the code itself. I think you understand my coding. If you have any doubt, please feel free to contact me....smile.gif

-Akhilesh B Chandran
Go to the top of the page
+Quote Post


Register to Make This Ad Go Away!

gleeenob
*



post 9 Nov, 2008 - 01:52 PM
Post #2
you messed up on the " Private Sub Form_Load()
Timer1.Enabled = False
End Sub " part but hey w/e
Go to the top of the page
+Quote Post


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 12/3/08 12:28AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month