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