Results 1 to 3 of 3

Thread: Label animation

  1. #1

    Thread Starter
    Frenzied Member SomethinCool's Avatar
    Join Date
    Jan 2001
    Location
    Malvern, PA
    Posts
    1,407

    Talking Label animation

    I'm doing a simple animation for my splash screen.

    A label will move up and then back down..(i dont know know if i'm going to do this or not..)

    This is the code i have..

    VB Code:
    1. Private Sub frmSplash_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    2.         Me.Show()
    3.         Pause(3000)
    4.         Do Until Label1.Location.X = 25
    5.             Do Until Label1.Location.X = 16
    6.                 Label1.Location.X.Equals(Label1.Location.X + 1)
    7.                 Pause(100)
    8.             Loop
    9.             Label1.Location.X.Equals(Label1.Location.X + 1)
    10.             Pause(100)
    11.         Loop
    12.     End Sub

    Now i tried doing label1.Location.X = Label1.Location.X + 1 but it had the blue zigzag line under it..

    How can i make the label go up and then back down?

    (This is the code for the pause function:

    VB Code:
    1. Public Declare Function GetTickCount Lib "kernel32" () As Long
    2. Public Sub Pause(Interval As Long)
    3.     Dim Start
    4.     Start = GetTickCount
    5.     Do While GetTickCount < Start + Interval
    6.     Application.DoEvents()
    7.     Loop
    8. End Sub

    )

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    A very simple way ! Give it a look !
    Attached Files Attached Files

  3. #3

    Thread Starter
    Frenzied Member SomethinCool's Avatar
    Join Date
    Jan 2001
    Location
    Malvern, PA
    Posts
    1,407
    what i want the label to do is start at 40,24 and move the Y up to 16 and then back down to 24..but i dont know how to do that..

    Can you show me how to do that please? I tried editing the code but it like..freaked out lol

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