Results 1 to 5 of 5

Thread: Font Expand

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    137

    Question 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

  2. #2
    Member
    Join Date
    Nov 2002
    Location
    Dallas, Texas
    Posts
    62
    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:
    1. Private Sub Timer1_Timer()
    2.   'FSize is my Public integer value that keeps the FontSize Number
    3.   IF FSize => 75 Then Timer1.Enabled = False: Exit sub
    4.   Label1.FontSize = FSize 'Increase Font Size By 1
    5.   FSize = FSize + 1
    6. 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

  3. #3
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344
    VB Code:
    1. Dim FSize As Integer
    2. Private Sub Timer1_Timer()
    3. For FSize = 10 To FSize
    4.   'FSize is my Public integer value that keeps the FontSize Number
    5.   If FSize >= 75 Then Timer1.Enabled = False: Exit Sub
    6.   Label1.FontSize = FSize 'Increase Font Size By 1
    7.   FSize = FSize + 1
    8. Next
    9. 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

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    137
    Thank you so much

    Originally posted by Nightwalker83
    VB Code:
    1. Dim FSize As Integer
    2. Private Sub Timer1_Timer()
    3. For FSize = 10 To FSize
    4.   'FSize is my Public integer value that keeps the FontSize Number
    5.   If FSize >= 75 Then Timer1.Enabled = False: Exit Sub
    6.   Label1.FontSize = FSize 'Increase Font Size By 1
    7.   FSize = FSize + 1
    8. Next
    9. End Sub

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    137
    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:
    1. Private Sub Timer1_Timer()
    2.   'FSize is my Public integer value that keeps the FontSize Number
    3.   IF FSize => 75 Then Timer1.Enabled = False: Exit sub
    4.   Label1.FontSize = FSize 'Increase Font Size By 1
    5.   FSize = FSize + 1
    6. 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
  •  



Click Here to Expand Forum to Full Width