G
Galen Somerville
My current screen resolution is set to 1024 x 768. My form size always comes
up as 1032 x 748.
I have tried the help sample
' Retrieve the working rectangle from the Screen class
' using the PrimaryScreen and the WorkingArea properties.
Dim workingRectangle As System.Drawing.Rectangle = _
Screen.PrimaryScreen.WorkingArea
' Set the size of the form slightly less than size of
' working rectangle.
Me.Size = New System.Drawing.Size(workingRectangle.Width, _
workingRectangle.Height)
' Set the location so the entire form is visible.
Me.Location = New System.Drawing.Point(0, 0)
the workingRectangle comes up as 1024 x 740. the Me.Size comes up as 1032 x
748 and location as -4 x -4
It doesn't matter what the StartPosition and AutoSize is set to. What gives?
I'm trying to use the Form Width to set a drawing Panel (PictDraw) to the
maximum width based on the the width being a multiple of 4. I guess I'll
have to use the SystemDrawing.Size(workingRectangle.Width) in the following
code. The Form margin is set to Single.
Index = Me.Width - 2
Index = Int(Index / 4)
Index = Index * 4
gScreen.HorPixels = Index
With PictDraw
X1Y1.X = Int(Int((Me.Width - Index) ) / 2)
X1Y1.Y = 0
.Location = X1Y1
X2Y2.X = gScreen.HorPixels
X2Y2.Y = 450
.Size = X2Y2
End With
Any ideas as to why the form always comes up 1032 X748 ?
GalenS
up as 1032 x 748.
I have tried the help sample
' Retrieve the working rectangle from the Screen class
' using the PrimaryScreen and the WorkingArea properties.
Dim workingRectangle As System.Drawing.Rectangle = _
Screen.PrimaryScreen.WorkingArea
' Set the size of the form slightly less than size of
' working rectangle.
Me.Size = New System.Drawing.Size(workingRectangle.Width, _
workingRectangle.Height)
' Set the location so the entire form is visible.
Me.Location = New System.Drawing.Point(0, 0)
the workingRectangle comes up as 1024 x 740. the Me.Size comes up as 1032 x
748 and location as -4 x -4
It doesn't matter what the StartPosition and AutoSize is set to. What gives?
I'm trying to use the Form Width to set a drawing Panel (PictDraw) to the
maximum width based on the the width being a multiple of 4. I guess I'll
have to use the SystemDrawing.Size(workingRectangle.Width) in the following
code. The Form margin is set to Single.
Index = Me.Width - 2
Index = Int(Index / 4)
Index = Index * 4
gScreen.HorPixels = Index
With PictDraw
X1Y1.X = Int(Int((Me.Width - Index) ) / 2)
X1Y1.Y = 0
.Location = X1Y1
X2Y2.X = gScreen.HorPixels
X2Y2.Y = 450
.Size = X2Y2
End With
Any ideas as to why the form always comes up 1032 X748 ?
GalenS