Upside down screen.

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
3 posts Page 1 of 1
Contributors
Lewis
Coding God
Coding God
Posts: 1564
Joined: Sun Dec 20, 2009 2:12 pm

Upside down screen.
Lewis
Hello, I would like to know how to flip my screen upside down, Or if i can, a webbrowser. But if it is the webbrowser, i want the flash to flip upside down aswell. Even better: Something were a flash player would be upside down :D
Image
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Upside down screen.
mandai
There isn't an easy way to do this since the webbrowser does not provide a Paint event or a way to get a Graphics object from it (plus activex controls like flash would have their own window drawing routines that would need to be altered in some way as well).

Controls like buttons and labels should work fine with this though:
Code: Select all
    Private Sub upsideDownPaint(ByVal sender As Control, ByVal e As System.Windows.Forms.PaintEventArgs)
        Dim bmp As Bitmap = New Bitmap(sender.Width, sender.Height)
        sender.DrawToBitmap(bmp, New Rectangle(0, 0, bmp.Width, bmp.Height))
        Dim m As Matrix = New Matrix()
        m.RotateAt(180, New PointF(bmp.Width, bmp.Height))
        e.Graphics.Transform = m
        m.Dispose()

        e.Graphics.DrawImage(bmp, New Point(bmp.Width, bmp.Height))
        bmp.Dispose()

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        For i As Integer = 0 To Me.Controls.Count - 1
            AddHandler Me.Controls(i).Paint, AddressOf upsideDownPaint
        Next
    End Sub
Lewis
Coding God
Coding God
Posts: 1564
Joined: Sun Dec 20, 2009 2:12 pm

Re: Upside down screen.
Lewis
Would that work if i added a flash object?
Image
3 posts Page 1 of 1
Return to “Tutorial Requests”