Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB
VB.NET
ASP
ASP.NET
C#
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Untitled
Author:
Soetam Rizky
E-mail:
Click to e-mail author
Submitted:
11/14/2001
Version:
VB4, VB5, V
Compatibility:
VB4, VB5, VB6, VB.NET
Category:
Controls
Views:
11320
Small procedure to grow or shrink the label, good for beginners to learn how to use looping.
Declarations:
'none
Code:
'*************************************************** '** You must have a form with two command button ** '** and one label in it. ** '** To grow the label, place bigger number ** '** for first parameter and boolean parameter ** '** with false ** '** To shrink the label, place smaller number ** '** for first parameter and boolean parameter ** '** with true ** '** Try to modify the program with blinking color ** '** ** '** Good luck !! ** '** ** '** Soetam Rizky ** '** soetamrizky@yahoo.com ** '*************************************************** Private Sub Command1_Click() Call growlabel(72, 8, False) End Sub Private Sub Command2_Click() Call growlabel(8, 72, True) End Sub Private Sub growlabel(awal As Integer, akhir As Integer, besar As Boolean) Label1.Visible = True: Label1.Font.Size = awal: x = 1 If besar Then Do While Label1.Font.Size <= akhir Label1.Font.Size = Label1.Font.Size + x: x = x + 0.5 y = 0: Do While y <= 100000: y = y + 1: Loop Loop Else Do While Label1.Font.Size >= akhir Label1.Font.Size = Label1.Font.Size - x: x = x + 0.5 y = 0: Do While y <= 100000: y = y + 1: Loop Loop End If Label1.Visible = False End Sub
ASP.NET Hosting
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2010 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement