|
-
May 25th, 2004, 09:27 AM
#1
Thread Starter
New Member
-
May 25th, 2004, 09:36 AM
#2
Ex-Super Mod'rater
Place a Timer on your form and call it TmrLabel then add this code:
VB Code:
Private Sub TmrLabel_Timer()
Static Times As Integer
If Times = 10 Then ' Change 10 to the amount of steps you want!
'Hide the other form...
Form2.Visible = False
'Disable the Timer...
TmrLabel.Enabled = False
'Set Times to zero so it can be run again...
Times = 0
Else
'Do the code to make the label smaller...
'Increment the counter...
Times = Times + 1
End If
End Sub
Hope that helps you, I didn't do the code for shrinking the label because I wasn't sure how your going about that .
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
May 25th, 2004, 09:39 AM
#3
Thread Starter
New Member
timer shrinking
what i mean by the timer shrinking is that it will be like a label box that is a long rectangle and as the time runs out the rectangle will get shorter.
-
May 25th, 2004, 09:46 AM
#4
Ex-Super Mod'rater
Re: timer shrinking
Posted by sniper_014
what i mean by the timer shrinking is that it will be like a label box that is a long rectangle and as the time runs out the rectangle will get shorter.
Your going to be changing the font to do that right?
You will still be able to use my code, the total time until the time runs out will be 10 * TmrLabel.Interval (where the 10 is you can chage this to add more time), the interval will simply determine how acurate it is, so if you make the interval smaller then it will be smooth but if you make it big it will be jumpy. Whenever you change the interval remember it will effect the total time so you'll need to then edit the 10 .
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
May 25th, 2004, 09:52 AM
#5
Ex-Super Mod'rater
If you put this line where I left a spare then it works but I don't know how you want it to shrink. If it would shink into the center (which is a bit harder) or like this line does makes it shrink into the top left corner :
VB Code:
Label1.Font.Size = Label1.Font.Size - 2
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
May 25th, 2004, 10:40 AM
#6
Frenzied Member
I really would consider using a set of functions based on GetTickCount() instead of the normal VB timers, you can save a lot of resources by doing that ...
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
- Zack de la Rocha
Hear me roar.
-
May 25th, 2004, 10:03 PM
#7
Fanatic Member
Place a timer on the form, give it an interval of 10. Put your label, double click the timer, and in the event make the label shrink relative to itself.
...cooties? over the internet?
Don't pay attention to this signature, it's contradictory.
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
|