?
Solved

Form Size

Posted on 2007-07-28
6
Medium Priority
?
216 Views
Last Modified: 2010-04-23
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
0
Comment
Question by:JoeBo747
  • 3
  • 2
6 Comments
 
LVL 13

Expert Comment

by:hiteshgoldeneye
ID: 19583944
you can set controlbox = false in Form2 and set its caption=False
0
 
LVL 13

Expert Comment

by:hiteshgoldeneye
ID: 19583945
sorry caption =""
0
 
LVL 1

Author Comment

by:JoeBo747
ID: 19584040
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 13

Accepted Solution

by:
hiteshgoldeneye earned 1600 total points
ID: 19584085
0
 
LVL 48

Assisted Solution

by:jpaulino
jpaulino earned 400 total points
ID: 19585040
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
 
LVL 1

Author Comment

by:JoeBo747
ID: 19587426
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

Featured Post

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month16 days, 7 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question