Display Orientation

Try this:

Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint



scale the picturebox graphics context to 1 times positive X, and 1 times negative (reverse) Y so drawing is
done bottom-up
e.Graphics.ScaleTransform(1.0F, -1.0F, Drawing2D.MatrixOrder.Append)

e.Graphics.TranslateTransform(0.0F, CSng(PictureBox1.Height), Drawing2D.MatrixOrder.Append)


End Sub
 
i wanna change the display orientation of the screen ,whit some code of this page i can change the screen resolution , but i need change the orientation too , i think it can be do it whit the same api of the screen resolution change , but im not sure how ..

tks a lot ..
 
Yeh, you change change the orientation of the window or the whole screen using API functions.

Check out these functions:

SetViewportExtEx
SetViewPortOrgEx
SetWindowOrgEx
SetWindowExtEx

and if you want to change them relative to the current orientation, there are functions to get those orientations:

GetViewPortExtEx
GetWindowOrgExt
etc.
 
Back
Top