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. Rotate Problem

Rotate Problem

Scheduled Pinned Locked Moved C#
questionhelptutorial
4 Posts 3 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.
  • A Offline
    A Offline
    anupamwb
    wrote on last edited by
    #1

    How to rotate a text/image automatically from left side to right side in form or vice versa I use adrotator in case of image, but the image is not rotating .it is fixed in position. and also in case of label(text). How can i do this ? thanks

    G 1 Reply Last reply
    0
    • A anupamwb

      How to rotate a text/image automatically from left side to right side in form or vice versa I use adrotator in case of image, but the image is not rotating .it is fixed in position. and also in case of label(text). How can i do this ? thanks

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      anupamwb wrote:

      I use adrotator in case of image, but the image is not rotating .it is fixed in position.

      I don't think that you mean the same thing by "rotating" in this case. When ads are rotated, they are simply show one at a time. When graphically displaying text or images, rotating means that you rotate the object around a fixed point. You seem to rather be looking for "moving" than "rotating", is that right?

      Experience is the sum of all the mistakes you have done.

      A 1 Reply Last reply
      0
      • G Guffa

        anupamwb wrote:

        I use adrotator in case of image, but the image is not rotating .it is fixed in position.

        I don't think that you mean the same thing by "rotating" in this case. When ads are rotated, they are simply show one at a time. When graphically displaying text or images, rotating means that you rotate the object around a fixed point. You seem to rather be looking for "moving" than "rotating", is that right?

        Experience is the sum of all the mistakes you have done.

        A Offline
        A Offline
        anupamwb
        wrote on last edited by
        #3

        Yes,u r right, term should be "moving" . the text /image should be automatically moving from one side to another side of form when loading.this moving should be continious. i used adrotator but did not get result.

        T 1 Reply Last reply
        0
        • A anupamwb

          Yes,u r right, term should be "moving" . the text /image should be automatically moving from one side to another side of form when loading.this moving should be continious. i used adrotator but did not get result.

          T Offline
          T Offline
          techieboi
          wrote on last edited by
          #4

          Hi, Regarding your problem, the best way to flip text (of which I know) is to convert the text to an image. Once it's an image, you can do all sorts of kewl stuff to it. Depending on whether you're working in a web or windows environment, once you have flipped the image you will need to display it. If you're working in a web environment, I would create a HTTP Handler to perform the flip and stream the resultant image to the browser. I've put together a small example which should help: class Program { static void Main(string[] args) { RotateClockwise(@"This is a test!").Save(@"C:\Test.gif", System.Drawing.Imaging.ImageFormat.Gif); } /// <summary>Draws a string to an image and rotates the image 90 degrees</summary> /// <param name="text">The string to be rotated</param> /// <returns>An image containing the rotated text</returns> public static System.Drawing.Image RotateClockwise(string text) { System.Drawing.Image rotateImage = null; // Create a new bitmap using (System.Drawing.Bitmap rotateBitmap = new System.Drawing.Bitmap(100, 100)) { // Create an image from the bitmap rotateImage = System.Drawing.Image.FromHbitmap(rotateBitmap.GetHbitmap()); // Draw the string to the image using (System.Drawing.Graphics graphics = System.Drawing.Graphics.FromImage(rotateImage)) { graphics.DrawString(text, new System.Drawing.Font("verdana", 8), new System.Drawing.SolidBrush(System.Drawing.Color.Pink), 0, 0); } // Rotate the image rotateImage.RotateFlip(System.Drawing.RotateFlipType.Rotate90FlipNone); } // Return an image containing our rotated text return rotateImage; } }

          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