Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. i want to continuously rotating

i want to continuously rotating

Scheduled Pinned Locked Moved C#
graphics
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    maifs
    wrote on last edited by
    #1

    i am trying this but private void pbx_MouseDown(object sender, MouseEventArgs e) { en = true; } public void FlagEnableForRotating(bool enable) { enable2 = enable; } public Bitmap rotateImage(Bitmap b, float angle) { if (enable2) { int maxside = (int)(Math.Sqrt(b.Width * b.Width + b.Height * b.Height)); ////create a new empty bitmap to hold rotated image Bitmap returnBitmap = new Bitmap(maxside, maxside); ////make a graphics object from the empty bitmap Graphics g = Graphics.FromImage(returnBitmap); //move rotation point to center of image g.TranslateTransform((float)b.Width / 2, (float)b.Height / 2); //rotate g.RotateTransform(angle); //move image back g.TranslateTransform(-(float)b.Width / 2, -(float)b.Height / 2); //draw passed in image onto graphics object g.DrawImage(b, new Point(0, 0)); return returnBitmap; } return b; } private void pbx_MouseMove(object sender, MouseEventArgs e) { if (en && enable2) { pbx.Image = rotateImage(m, e.Y); } } private void pbx_MouseUp(object sender, MouseEventArgs e) { en = false; enable2 = false; } private void tsxImagesRota_Click(object sender, EventArgs e) { frm2.FlagEnableForRotating(true); } it is rotating but i want to set it on numericUPDOwn ,when user press on numericUpDown then its rotating continuously

    hghghgh

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups