• 0

how do u rotate objects in vb.net


Question

8 answers to this question

Recommended Posts

  • 0

If you mean rotated in the sense of tilting it on an angle, i don't believe that's possible, and it's not called an Object, not correct to call it that, i mean it essentially sort of is... but it's called a Control. You can position the controls in different locations, but rotating it in an angle would be hard, it depends what you want to do , have text drawn on a slanted angle? You might want to do some custom drawing.

  • 0

Well, you have to 2 options if you are going to rotate text ONLY:

A: you can use this code to make a text rotated ("TEXT ROTATED")

 ? ?Static AngDegree As Long 

 ? ?' Draw the text with angle EX: (45, 45).
 ? ? Dim graphics_path As New GraphicsPath(Drawing.Drawing2D.FillMode.Winding)
 ? ?graphics_path.AddString("TEXT ROTATED", New FontFamily("Tahoma"), ?FontStyle.Bold, 20, New Point(45, 45), StringFormat.GenericDefault)

 ? ?' rotating (45, 45).
 ? ?Dim rotation_matrix As New Matrix()
 ? ?AngDegree += 20
 ? ?rotation_matrix.RotateAt(angle, New PointF(45, 45))

 ? ?' Transforming.
 ? ?graphics_path.Transform(rotation_matrix)

 ? ?' Final View after rotating
 ? CreateGraphics.Clear(Me.BackColor)
 ? CreateGraphics.FillPath(Brushes.Black, graphics_path)
 ? ?End With

B: Build your control by using "USER CONTROL" and attaching to it the "label object" and by doing some fucntion and property for rotation.

upgrade you control properties by replacing font,size, angles and fill mode with variables which is controlled "control properties"

Note : Most of fonts works with this mode "FillMode.Winding"

Option B is cool but if you tried to move the text by using a timer, it will be flickering or may not see the text at all.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • My best decision: SHIFT+DELETE WINDOWS Then Installed Fedora Linux. Now I am a Happy Person
    • I value a game as a whole including graphics. But going backwards in terms of graphics with a game I'm not already invested in (as in something I played and loved in the past and still do) is off-putting. Its a very poor demo trailer if they didn't crank the settings to max that would be ridiculous. Different strokes for different folks i guess, i'm not into slop the trailer and likely game could have been far better, it doesn't it instead looks like it was made on a shoe string budget or with lack of experience. But that could also be down to trying to get it running on low budget/outdated hardware and sacrificing the top end.
    • > Our goal is to ensure that the App Store remains an outstanding opportunity for developers and a safe, trusted experience for our users. There are so many scam apps on the platform that it is hard to believe they are truly interested in having a safe, trusted experience for their users.
    • Google announces upgraded Gemini 2.5 Pro model with enhanced capabilities by Pradeep Viswanathan Google today announced an updated Gemini 2.5 model with several improvements that can be observed in popular AI benchmarks. Google particularly highlighted that the new Gemini 2.5 Preview 06-05 "Thinking" model performs better in coding, math, science, and reasoning. Last month, during Google I/O, Google released an updated version of the Gemini 2.5 Pro model with significant improvements. Today's update builds on the release of the previous month with further enhancements. In addition to benchmark improvements, based on user feedback, this updated Gemini 2.5 Pro model also comes with improved style and structure, which will result in creative and better-formatted responses for end users. You can find the benchmark comparison with other leading AI models below. As you can notice in the above table, this updated Gemini 2.5 Pro preview model is now SOTA (State-of-the-Art) in coding benchmarks like Aider Polyglot. It also scored SOTA performance on GPQA and Humanity’s Last Exam (HLE) benchmarks, which test math, science, knowledge, and reasoning capabilities. In real-world testing, this latest 2.5 Pro model scored 24 points better on LMArena, maintaining its lead, and a 35-point jump on WebDevArena at 1443. Developers can access this latest Gemini 2.5 Pro preview model through the Gemini API via Google AI Studio and Vertex AI. General consumers will be able to access this model via the Gemini app. Google also confirmed that the Gemini 2.5 Pro model will be generally available in a couple of weeks, allowing developers to start using it in production-ready enterprise-scale applications.
    • The Bromance is definitely over! 🤣🤣🤣
  • Recent Achievements

    • One Year In
      survivor303 earned a badge
      One Year In
    • Week One Done
      jbatch earned a badge
      Week One Done
    • First Post
      Yianis earned a badge
      First Post
    • Rookie
      GTRoberts went up a rank
      Rookie
    • First Post
      James courage Tabla earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      419
    2. 2
      +FloatingFatMan
      182
    3. 3
      snowy owl
      181
    4. 4
      ATLien_0
      176
    5. 5
      Xenon
      135
  • Tell a friend

    Love Neowin? Tell a friend!