Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How disable scrollbars in a maximized mdi parent form? 4

Status
Not open for further replies.

FemPro

Programmer
Feb 15, 2008
28
GR
Hello everyone.
I have a mdi parent window state maximized form and many mdi child forms. When i load a child form and move it, the scrollbars are appearing in the parent form. How can i disable the scrollbars in mdi parent form? Any help will be much appreciated.

Thank you
in advanced
FemPro.
 
Sorwen, to the best of my knowledge - nothing.

The latter is backward compatible (syntaxwise - if there is such a word) with VBA & VB5/6 and earlier. I tend to use them interchangeably.


FemPro, I think so, but I don't have VS on this machine so I'll have to get back to you later on.

[vampire][bat]
 
Thanks. :)

-I hate Microsoft!
-Forever and always forward.
 
FemPro,

Set the following properties for the MdiParent:

FormBorderStyle = FixedSingle (or Fixed3D whichever you prefer)
StartPosition = CenterScreen
MinimizeBox = False
MaximizeBox = False

WindowState = Normal (default setting doesn't need to be changed)


Modify Sub New so that it looks like this:
Code:
	Public Sub New()
		' This call is required by the Windows Form Designer.
		InitializeComponent()

		' Add any initialization after the InitializeComponent() call.

		[b]MinimumSize = New Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height)[/b]
		Dim mdi As New MdiClientWithoutScrollBars(Me)

	End Sub

This ensures that the form can't be made any smaller than the available workspace, but obviously the users can still move it out of the way if they need to get to a program that is being obscured by it.

If you want to make sure that they can't use anything else then set the TopMost property to True (although I'm not certain that this is foolproof).

Hope this helps.

[vampire][bat]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top