Form Size

Hi Experts

I have a MDI form1 that loads and fills the screen; I have a second form2 that is loaded as a child form2 has no title bar. I want form2 to load and fill the whole of the available space below form1s menu strip. I dont want the user to be able to re-size or close the form. If I set form2 to WindowState.Maximized  an icon appears above form1, can I get rid? Is all this possible

Regards,
Joe
LVL 1
JoeBo747Asked:
Who is Participating?
 
Hitesh ManglaniCommented:
0
 
Hitesh ManglaniCommented:
you can set controlbox = false in Form2 and set its caption=False
0
 
Hitesh ManglaniCommented:
sorry caption =""
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
JoeBo747Author Commented:
Hi hiteshgoldeneye

Thanks for your reply, I have tried your suggestion, this makes the control inactive, but the control is still there.

I have perhaps not been clear with my explanation, the reason I require this format is that making form2 a MDI form would be the ideal solution it has all the attributes I require, apart from the back colour changes to black when the MDI option is selected, if it where possible to set the forms back colour to white at runtime I would have no need of form1.

Regards
Joe
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
If you do that you have to resize the child form each time you resize the mdi. That causes some visual problems with the resize effect and if you change the font size, or the window area you can also have some problem in your app.

So, why don't you maximize your child form and control the unwanted events. Example:

Private Sub frmPrincipal_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
    e.Cancel = True
End Sub
0
 
JoeBo747Author Commented:
Hi hiteshgoldeneye: & jpaulino:

Thanks for your replies all of which have been useful in getting me nearly where I want to be, the link hiteshgoldeneye: proved very useful so I have to award this the greatest number of points, Thanks.
As you have answered the question I am awarding the pints now. The nearly relates to an issue I have not been able to find a solution for, I will post another question named "Forms multiple instances". I hope you can look this up and help.

Regards
Joe
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.