dcsimg
Results 1 to 4 of 4

Thread: moving a drawing

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Posts
    66

    moving a drawing

    i am just wondering how you move around objects declared as

    Dim example As System.Drawings.Graphics



    example.left
    example.top


    my compiler says .left is not a member of drawings.graphics....and when i looked, i didnt see anything like move...so how do yuo move a drawing?

  2. #2
    Junior Member
    Join Date
    Mar 2007
    Location
    New Jersey
    Posts
    30

    Re: moving a drawing

    Well there should be something like example.x and example.y, something that holds the position. Then to move (example.x = example.x + 1) would move it over 1 and the same would apply to the y variable.
    Final Fantasy Tactics Online
    Blank Engine (3D, Opensource, VB Engine)(Under construction but does have a download)

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Posts
    66

    Re: moving a drawing

    well....what i am saying is that there ISN'T anything under the graphics class that i can see that will allow me to do this...

    Ball.FillEllipse(Brushes.Yellow, 100, 120, 20, 20)
    Bar.FillRectangle(Brushes.Black, 200, 335, 80, 15)

    i start the form with a ball and a simple rectangle and i want to move them using the timer event procedure....

    do i have to use a matrix?

  4. #4
    Hyperactive Member singularis's Avatar
    Join Date
    Nov 2006
    Location
    Over There!
    Posts
    372

    Re: moving a drawing

    Note the word "Graphics" not "Graphic"!

    The Graphics class allows you to DRAW graphics! The Graphics object is not a graphic!
    If what I said was helpful, give me rep!

    My Complete Games: -- 2D Zone (Space Shooter game) || _2D Zone 2_ || Ninja Blob (2D platformer) || Dren (Co-op up to 4 player base defence game)

    My Projects: -- The Dread Engine (2D VB game Engine) || A* Path Finding


    An excellent site for learning DirectX7, 8 & 9 (for VB6, C# & VB.net) would be: directx4vb.vbgamer.com --- For my projects and games see: pieper.freehostia.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width