A
active
Problem: The PictureBox display appears to have the image cut off. I.e.,
the image bottom does not display although the PictureBox has room for it.
It occurred to me that what was displayed was the same size as the
PictureBox was before it was resized. So I figured the bitmap was too small
and tried to increase it's size as shown below.
Two things: First it didn't fix the problem.
Secondly, I'm not sure I've done it correctly and further don't know to
finish the code (see the commented out code.
Any helpful suggestions would be appreciated:
Cal
PS The image was created by drawing strings.
Private Sub picData_Resize(ByVal sender As Object, ByVal e As
System.EventArgs) Handles picData.Resize
If Not ((g1 Is Nothing) Or (b1 Is Nothing)) Then
Dim g2 As Drawing.Graphics = picData.CreateGraphics
Dim b2 As Drawing.Bitmap = New Drawing.Bitmap(picData.Width, picData.Height,
g2)
g2.DrawImage(b2, 0, 0)
'g1.Dispose()
'b1.Dispose()
'g1 = g2
'b1 = b2
End If
End Sub
the image bottom does not display although the PictureBox has room for it.
It occurred to me that what was displayed was the same size as the
PictureBox was before it was resized. So I figured the bitmap was too small
and tried to increase it's size as shown below.
Two things: First it didn't fix the problem.
Secondly, I'm not sure I've done it correctly and further don't know to
finish the code (see the commented out code.
Any helpful suggestions would be appreciated:
Cal
PS The image was created by drawing strings.
Private Sub picData_Resize(ByVal sender As Object, ByVal e As
System.EventArgs) Handles picData.Resize
If Not ((g1 Is Nothing) Or (b1 Is Nothing)) Then
Dim g2 As Drawing.Graphics = picData.CreateGraphics
Dim b2 As Drawing.Bitmap = New Drawing.Bitmap(picData.Width, picData.Height,
g2)
g2.DrawImage(b2, 0, 0)
'g1.Dispose()
'b1.Dispose()
'g1 = g2
'b1 = b2
End If
End Sub