Results 1 to 10 of 10

Thread: rotate, how?

  1. #1

    Thread Starter
    Fanatic Member alkatran's Avatar
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    860

    rotate, how?

    How do I make a picture rotate.

    Oh, and how do I make a thing move along an angle (45 degrees would equal moving up and right....)
    Don't pay attention to this signature, it's contradictory.

  2. #2
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    for rotating pictures take a look at www.ur.co.nz or search the forum this question has been asked many times...
    for the movement along an angle you just need a little trig:

    x=x+Speed*cos(angle)
    y=y+Speed*cos(angle)

    while angle is in radians. To convert degree to radians take it times (Pi/180).
    Sanity is a full time job

    Puh das war harter Stoff!

  3. #3

    Thread Starter
    Fanatic Member alkatran's Avatar
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    860

    .........

    I tried the cos/pi/angle and all that, can,t get it to work.
    Do u have an example of the code?
    Don't pay attention to this signature, it's contradictory.

  4. #4
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    hm well what I just put here is the code...

    you lets say for a test you are running a button over a form with an angle of 45.
    so you go like
    Code:
    angle=45*Pi/180
    Sub Button1_Click()
      button1.left = button1.left + 5*cos(angle)
      button1.top = button1.top + 5*sin(angle)
    End Sub
    now the button should move 5 pixels of distance every time you press it.
    Sanity is a full time job

    Puh das war harter Stoff!

  5. #5

    Thread Starter
    Fanatic Member alkatran's Avatar
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    860

    well

    ur code worked but I changed te angle and it still went the same direction!!!!
    Don't pay attention to this signature, it's contradictory.

  6. #6
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    totally impossible unless you added n*360
    check if you wrote the code right again...
    Sanity is a full time job

    Puh das war harter Stoff!

  7. #7

    Thread Starter
    Fanatic Member alkatran's Avatar
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    860

    maybe if

    do I have to define pi as 3.#####?

    (do u know the numbers?)
    Don't pay attention to this signature, it's contradictory.

  8. #8
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    yeah you do 3.14 will do it...
    Sanity is a full time job

    Puh das war harter Stoff!

  9. #9

    Thread Starter
    Fanatic Member alkatran's Avatar
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    860

    well, one uestion answered

    now I just need ot know how ot make a picture rotate. as in bitblt image (or paintpicture) to form and have it rotate, so if it was going up and right it would face that way.
    Don't pay attention to this signature, it's contradictory.

  10. #10
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    well that question is answered to
    go to www.ur.co.nz and take a look at the rotate pictures tutorial!
    Sanity is a full time job

    Puh das war harter Stoff!

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