|
-
Dec 18th, 2002, 01:33 AM
#1
Thread Starter
Addicted Member
Font Expand
How I can make the font expand gardually from size 10 to 75 in one minute time, during the form load??
Any help will be appraciated
Thank you in advance
-
Dec 18th, 2002, 02:00 AM
#2
Member
Ok Heres how you do it. The trick is you either would have to use a TIMER or use the &WAIT command during the FORM_LOAD event or else the text will go from 10 to 75 in a matter of seconds. I used a timer with a public variable which kept the size of the font then every 1 second increased it till it was => 75. This timer starts as soon as the form loads and there is practically no difference between putting it here and in the FORM_LOAD event except that in the Form_Load event it lags the form becuase it trys to pre-render the text before the actuall form loads, so the program does nothing (including the form which doesnt appear till the loop is done). Therefore it is easier to use the Timer to increase the size of the font till it is what you want.
I used a label for this experiment like so:
VB Code:
Private Sub Timer1_Timer()
'FSize is my Public integer value that keeps the FontSize Number
IF FSize => 75 Then Timer1.Enabled = False: Exit sub
Label1.FontSize = FSize 'Increase Font Size By 1
FSize = FSize + 1
End Sub
i just added a public variable named FSize which would be assigned to equal 10 during the form_load event and then Timer1 which runs till FSize is = to or > than 75 or whatever you wanted, this should do exactly what you need
oOBlackOrbOo
-
Dec 18th, 2002, 02:20 AM
#3
VB Code:
Dim FSize As Integer
Private Sub Timer1_Timer()
For FSize = 10 To FSize
'FSize is my Public integer value that keeps the FontSize Number
If FSize >= 75 Then Timer1.Enabled = False: Exit Sub
Label1.FontSize = FSize 'Increase Font Size By 1
FSize = FSize + 1
Next
End Sub
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Dec 18th, 2002, 02:40 AM
#4
Thread Starter
Addicted Member
Thank you so much
Originally posted by Nightwalker83
VB Code:
Dim FSize As Integer
Private Sub Timer1_Timer()
For FSize = 10 To FSize
'FSize is my Public integer value that keeps the FontSize Number
If FSize >= 75 Then Timer1.Enabled = False: Exit Sub
Label1.FontSize = FSize 'Increase Font Size By 1
FSize = FSize + 1
Next
End Sub
-
Dec 18th, 2002, 02:41 AM
#5
Thread Starter
Addicted Member
It is great
thanks alot
Originally posted by oOBlackOrbOo
Ok Heres how you do it. The trick is you either would have to use a TIMER or use the &WAIT command during the FORM_LOAD event or else the text will go from 10 to 75 in a matter of seconds. I used a timer with a public variable which kept the size of the font then every 1 second increased it till it was => 75. This timer starts as soon as the form loads and there is practically no difference between putting it here and in the FORM_LOAD event except that in the Form_Load event it lags the form becuase it trys to pre-render the text before the actuall form loads, so the program does nothing (including the form which doesnt appear till the loop is done). Therefore it is easier to use the Timer to increase the size of the font till it is what you want.
I used a label for this experiment like so:
VB Code:
Private Sub Timer1_Timer()
'FSize is my Public integer value that keeps the FontSize Number
IF FSize => 75 Then Timer1.Enabled = False: Exit sub
Label1.FontSize = FSize 'Increase Font Size By 1
FSize = FSize + 1
End Sub
i just added a public variable named FSize which would be assigned to equal 10 during the form_load event and then Timer1 which runs till FSize is = to or > than 75 or whatever you wanted, this should do exactly what you need
oOBlackOrbOo
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|