[VB.Net] Timers and Basic Animation menu

Shout-Out

User Tag List

Results 1 to 1 of 1
  1. #1
    Hallowsend's Avatar 滚开! 大声笑。I 是令人敬畏的。
    Reputation
    366
    Join Date
    Sep 2007
    Posts
    720
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [VB.Net] Timers and Basic Animation

    Timers in Visual Basic can help you do lots of things, including basic animation and making a basic MSN Spammer.

    Table of Contents
    1. Making timers to fit your needs
    2. Using timers for basic animation



    1. Timers in visual basic are like heaven. They can help you do so much, such as switching between to images every coulpe seconds, or making an object move. They are also not complicated at all, and don't even require any variables to be declared in your programming. For something so useful, it sure is awfully easy! Alright, so now, you will need to create a timer on your form. Find the toolbox on the upper left hand corner of the work space, and you will need to navigate to: All Windows Forms -> Timers. Now, drag one anywhere on your form. You will notice it appears on the bottom of the space you have, in a specially marked dark area.

    Click on your timer to view its properties in the properties window. For now, make sure the interval is set to 100. This better suits our needs for the animation. Once you set its interval, give it a name. I would do tmrMoveObject, or something along those lines. Also, make it enabled. We are now done with the timer and are ready to move on to the next part of the guide.



    2. Timers are a good way to get things to move every second. How you use a timer for animation is as follows. Now that you have the timer, get a picture of something basic to add to your form. For this tutorial, I used a waffle: http://img21.imageshack.us/img21/1300/6a00d83451b77469e200e54aj7.gif.
    Once you have the picture your going to use, add it in a picture box. Find the picture box tool in the toolbox, and drag one onto your screen. Click on it to view the properties, and change the name to PicMoveObject, or something similar. Find the image property, and then click on the "..." button. For tutorial purposes, go to local resources and click Import. Now navigate to the folder with your image and double click on it.

    Now you should have a picture box with a picture of your choosing inside of it. Double click on the timer to view properties of it, and type the following code into it (Don't just copy paste, analyze it too! Ill explain it as well.)

    Code:
    PicMoveObject.Left = PicMoveObject.Left + 10
    This will move the object to the right 10 twips / pixels every 100 Miliseconds. What we are doing is adding to the left property of PicMoveObject every 100 milliseconds, so that it looks like it is traveling right. If you want to make it look very smooth, make the interval on the timer 1 and keep the left property add to 10.


    Thanks for reading. If you have any questions, feel free to ask here or PM me.
    -Hallowsend

    [VB.Net] Timers and Basic Animation

Similar Threads

  1. old blast wave pyro and fireball animation
    By ashelol in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 04-08-2009, 09:15 AM
  2. Level 80 PvP Guide - Very Simple and Basic
    By Talint in forum World of Warcraft Guides
    Replies: 5
    Last Post: 01-25-2009, 01:09 PM
  3. Basic Animation 2: Tweening
    By Adrenalin3 in forum Art & Graphic Design
    Replies: 1
    Last Post: 10-25-2007, 11:32 PM
  4. Nelf > Undead (A way to retain the original model and switch animation)
    By m2]ceman in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 10-01-2007, 07:51 AM
  5. Basic Animation.(Picture Heavy)
    By Adrenalin3 in forum Art & Graphic Design
    Replies: 3
    Last Post: 09-11-2007, 05:33 PM
All times are GMT -5. The time now is 10:38 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search