Screen Resolutions RRS feed

  • Question

  • I have created an app that creates a bitmap, draws on, and saves coordinates.  The app was developed and tested on an HP iPaq 111.  On screens with higher resolutions, the drawings are much smaller.  How can I handle this for various screen resolutions?  The rest of the form looks great, other than the graphics that get drawn.
    Tuesday, January 26, 2010 1:27 AM


All replies

  • Here is my code:
    Me.objBitmap = New Bitmap(Me.pbHalfCourt.Size.Width, Me.pbHalfCourt.Size.Height)
    Me.objGraphics = Graphics.FromImage(Me.objBitmap)
    Me.objGraphics.FillRectangle(New SolidBrush(System.Drawing.Color.Tan), 0, 0, Me.Size.Width, Me.Size.Height)
    Using objGraphics As Graphics = Graphics.FromImage(Me.objBitmap) 'e.Graphics
           Dim objRectangle As Rectangle
           Dim objPen As New Pen(colOR:=System.Drawing.Color.Black, Width:=2)
           objGraphics.DrawEllipse(objPen, 26, -68, 136, 136)
    End Using
    Tuesday, January 26, 2010 1:37 AM
  • Hi Allen34,

    Just from your code, you draw an ellipse with special size, if you want to show the ellipse with same ratio to the whole screen size. You have to adjust the size with same ratio.

    For more information, please see the FAQ:
    How to develop an application that is Resolution-Aware and Orientation-Aware?

    Best regards,
    Guang-Ming Bian - MSFT
    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Thursday, January 28, 2010 6:21 AM