Adblock breaks this site

Windows Component Location Help

Discussion in 'Programming General' started by ionide, Jan 2, 2009.

  1. ionide

    ionide Newcomer

    Joined:
    Sep 26, 2008
    Posts:
    20
    Referrals:
    0
    Sythe Gold:
    0
    Windows Component Location Help

    Hello, i am wondering if anyone knows how to sort of animate component movements, such as making a button slide to the right side of the form.

    I tried a timer with

    button1.location.x = button1.location.x +10

    it seems simple, but i cannot figure it out, if anyone could help, let me know.

    thanks,
    -ionide
     
  2. Flaming Idiots

    Flaming Idiots Active Member
    Visual Basic Programmers

    Joined:
    Dec 22, 2005
    Posts:
    235
    Referrals:
    1
    Sythe Gold:
    0
    Two Factor Authentication User
    Windows Component Location Help

    The location property is immutable. To move the button, you can just add to the Left property like below.

    Button1.Left += 10
    or
    Button1.Location += New Point(10, 0)
     
  3. ionide

    ionide Newcomer

    Joined:
    Sep 26, 2008
    Posts:
    20
    Referrals:
    0
    Sythe Gold:
    0
    Windows Component Location Help


    Thanks, i figured this out right before i checked this post, thanks for the reply :D
     
< I need an intro to pascal | C version of Guido Landi's discovery. >


 
 
Adblock breaks this site