If the main window of my application is maximized, all the windows call by
program (it is not a mdi application) open themselves maximized.
The window called by the main window has this code for its Load event :
Private Sub ShowOneImage_Lo ad(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Me.BackgroundIm age = ImageFromFile(" xxx.jpg")
Form1.Size = New System.Drawing. Size(Me.Backgro undImage.Width,
Me.BackgroundIm age.Height)
Me.Height = Me.BackgroundIm age.Size.Height
Me.Width = Me.BackgroundIm age.Size.Width
End sub
In spite of this code, if the calling window is maximized, the called window
is maximized.
If the main window is not maximized, then all is good.
Which property of the called window must I change to avoid this problem ?
Thanks for response.
program (it is not a mdi application) open themselves maximized.
The window called by the main window has this code for its Load event :
Private Sub ShowOneImage_Lo ad(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Me.BackgroundIm age = ImageFromFile(" xxx.jpg")
Form1.Size = New System.Drawing. Size(Me.Backgro undImage.Width,
Me.BackgroundIm age.Height)
Me.Height = Me.BackgroundIm age.Size.Height
Me.Width = Me.BackgroundIm age.Size.Width
End sub
In spite of this code, if the calling window is maximized, the called window
is maximized.
If the main window is not maximized, then all is good.
Which property of the called window must I change to avoid this problem ?
Thanks for response.
Comment