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
Printable View
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
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
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
Thank you so much
Quote:
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
It is great
thanks alot
Quote:
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