Wrox Programmer Forums
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 22nd, 2009, 12:29 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Default Application with MDI Form

Hi, all,

I create an application by using MDIForm with menu on it. when user click the menu, a form will be opened, I want to know when I need to open MDI child form and when I should open a ordinary form?

When I open a modal form, it gray all the menu on MDIForm, I don't want it like this, is it possible to solve this issue? And also when I try to add another menu on child form, when this child form is loaded, the menu went to parent form.

Can I add menu on child form?

Thanks!

Andraw
 
Old March 5th, 2009, 12:23 PM
Registered User
 
Join Date: Jan 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Modal Windows

Actually, the default of the show command is Modal, which means that the window will get all the focus and prevent the access to other child windows in the same MDI window until this child window is closed.
what you should do is to use the non-modal parameter with the show command. like:

FormB.Show vbModeless

this should solve the problem and the window will appear and wont affect the other child windows. But i must warn that if the window opend modeless and you click on other windows, there is a possibility they will cover this window and you will end up closing some windows to reach to that one.
 
Old March 21st, 2009, 05:06 AM
Authorized User
 
Join Date: Mar 2009
Posts: 49
Thanks: 0
Thanked 8 Times in 8 Posts
Default

Quote:
Originally Posted by BadihBarakat View Post
Actually, the default of the show command is Modal, which means that the window will get all the focus and prevent the access to other child windows in the same MDI window until this child window is closed.
what you should do is to use the non-modal parameter with the show command. like:

FormB.Show vbModeless

this should solve the problem and the window will appear and wont affect the other child windows. But i must warn that if the window opend modeless and you click on other windows, there is a possibility they will cover this window and you will end up closing some windows to reach to that one.
Incorrect sir. Defalut is vbModeless not vbModal and Modal is the name of the parameter(variable(optional)) that you are passing into the show method.

As for the menu problems you are experiencing Andraw,... The parent (MDI) menu items will be replaced by the child's menu items, so what you are seeing is the childs menu on the parent.

Good Luck





Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying MDI Child Form Menus with MDI Parent ashu_from_india Pro VB 6 3 June 10th, 2008 11:01 PM
Controlling MDI child form from MDI parent panel LuxCoder Pro Visual Basic 2005 1 May 25th, 2007 12:20 PM
Controlling MDI child form from MDI parent panel LuxCoder VB.NET 2002/2003 Basics 7 April 11th, 2007 02:38 PM
Controlling MDI child form from MDI parent panel LuxCoder VB How-To 1 April 9th, 2007 03:25 PM
Display Form only Once i MDI Application narendra_patil VS.NET 2002/2003 1 June 8th, 2005 05:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.