Hi,
I am trying to load a new MDI form with a picture box that should fill the whole form. I can't get it to size correctly when the form is loaded. In addition, I want to be able to resize the picture when the form is resized. Hi,
I am trying to load a new MDI form with a picture box that should fill the whole form. I can't get it to size correctly when the form is loaded. In addition, I want to be able to resize the picture when the form is resized. I think that one of my main problems are that I do not understand the difference between width and scalewidth. If you could offer any insight I would be very grateful.
Here where I load the form:
Private Sub loadChild(ByVal FileName As String)
Dim nForm As New frmChild
With nForm
.picMain.Picture = LoadPicture(FileName)
.Caption = FileName
.Show
.Top = .ScaleTop
.Left = .ScaleLeft
.Width = .picMain.Width
.Height = .picMain.Height
End With
End Sub
Here is my resize routine, I have the code commented out because I can't even get the first part to work.
Public Sub FormResize(ByRef myForm As frmChild)
With myForm
' .Width = .picMain.Width
' .Height = .picMain.Height
' .picMain.Width = .ScaleWidth
' .picMain.Height = .ScaleHeight
' .picMain.Left = .ScaleLeft
' .picMain.Top = .ScaleTop
End With
End Sub
Thanks,
-Uncle Cake
I am trying to load a new MDI form with a picture box that should fill the whole form. I can't get it to size correctly when the form is loaded. In addition, I want to be able to resize the picture when the form is resized. Hi,
I am trying to load a new MDI form with a picture box that should fill the whole form. I can't get it to size correctly when the form is loaded. In addition, I want to be able to resize the picture when the form is resized. I think that one of my main problems are that I do not understand the difference between width and scalewidth. If you could offer any insight I would be very grateful.
Here where I load the form:
Private Sub loadChild(ByVal FileName As String)
Dim nForm As New frmChild
With nForm
.picMain.Picture = LoadPicture(FileName)
.Caption = FileName
.Show
.Top = .ScaleTop
.Left = .ScaleLeft
.Width = .picMain.Width
.Height = .picMain.Height
End With
End Sub
Here is my resize routine, I have the code commented out because I can't even get the first part to work.
Public Sub FormResize(ByRef myForm As frmChild)
With myForm
' .Width = .picMain.Width
' .Height = .picMain.Height
' .picMain.Width = .ScaleWidth
' .picMain.Height = .ScaleHeight
' .picMain.Left = .ScaleLeft
' .picMain.Top = .ScaleTop
End With
End Sub
Thanks,
-Uncle Cake