★ Animated Form ★ Screenshots ★ SourceCode ★

Posts 1–15 of 19 · Page 1 of 2
★ Animated Form ★ Screenshots ★ SourceCode ★

Animated Form - Tutorial by Syphox


1. Set the size of your project to a very small value, I will take 38 because it's just the border without any space left.



2. Go to your Properties (or press F4) and search for FormBorderStyle. I recommend to set it to a "Fixed"-Value



3. Add a Timer to your project.



4. Right-Click your Form and click View Code.



4.1 You will see this.



5. Write this or copy & paste the code from below.



Code:
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load

    End Sub
6. Now we have to define what happens when someone starts our program, write the following or copy & paste the code from below.



Code:
Timer1.Interval = 1
Timer1.Start()
6.1 What does it do? It defines the Timer-Interval, means how fast the Timer will tick. Also it starts the Timer.

7. Now we have to define what the timer does. Write the following or copy & paste the code from below.



Code:
    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick

    End Sub
8. Now write the following or copy & paste the code from below.



Code:
        Me.Width = Me.Width + 3
        If Me.Width = 600 Then
            Timer1.Stop()
            Me.Width = 600
        End If
        If Me.Width > 600 Then
            Me.Width = 600
        End If
8.1 What does it do? We're telling the Timer about how many pixel he should expand the Width per tick, when it reaches 600 the Timer stops.
Also, if the Width is bigger than 600 because anything, it will be resized to 600.

9. Now we are finished. Press F5 to debug your program and check it out! You can do the same with the Height and other variables.

Since this Tutorial is 100% hand-written please leave a Thanks if you like it!
The SourceCode can be found as a VisualBasic-Project below!


Virus Scans:
VirusTotalⓘ
Jottiⓘ

Download:



AnimatedFormBySyphox_mpgh.net.rar19 KB · 56 downloads Clean
pretty cool!
//Approved
Quote Originally Posted by zarix View Post
pretty cool!
Thank you ^-^

Quote Originally Posted by Jorndel View Post
//Approved
Thanks Jorndel
~Syphox
Awesome tutorial ! Make more !
Quote Originally Posted by Julma Henri View Post
Awesome tutorial ! Make more !
Thank you very much Yeah I guess I'll do some more ^^
~Syphox
Quote Originally Posted by ~Syphox View Post
Thank you very much Yeah I guess I'll do some more ^^
~Syphox
Injector tutorial would be good.
Quote Originally Posted by Julma Henri View Post

Injector tutorial would be good.
Sure, will work on one and post it tomorrow ^^
~Syphox
Quote Originally Posted by ~Syphox View Post
Sure, will work on one and post it tomorrow ^^
~Syphox
Looking forward to it. Don't forget to mention me on it when posting
Very nice bro keep it up
Quote Originally Posted by Coper View Post
Very nice bro keep it up
Thanks mate
~Syphox


You may also want to add this : Timer1.stop

because the forum will keep being animated(kinda like shaking) if you didn't stop the timer.
Quote Originally Posted by Sazor98 View Post

You may also want to add this : Timer1.stop
because the forum will keep being animated(kinda like shaking) if you didn't stop the timer.
Do you mean in the second "if" ? Yeah could do that ^^
~Syphox
One thing to remember..

He wrote into the timer code, me.width += 3
If the width of the form don't land on the desired width, in this case 600, it'll keep going.

Example:
Me.Width is already defined as 200
Me.Width += 5
If me.Width = 204 then
Timer.Stop
End If

This won't work because the next interval of 5 after 200 is 205, which doesn't land on 204 and so the form width will continue to increase.
Quote Originally Posted by DawgiiStylz View Post
One thing to remember..

He wrote into the timer code, me.width += 3
If the width of the form don't land on the desired width, in this case 600, it'll keep going.

Example:
Me.Width is already defined as 200
Me.Width += 5
If me.Width = 204 then
Timer.Stop
End If

This won't work because the next interval of 5 after 200 is 205, which doesn't land on 204 and so the form width will continue to increase.
Oh, I didn't know that, I thought it would just stack it up until the desired size is reached... Thanks
~Syphox
Posts 1–15 of 19 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?