473,396 Members | 1,783 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Invoking a child form from another child form

3
Hi,

I have three forms. "Main form" is a container and "Logon Form" is the child of this. I want to invoke another "AppLogin Form" from "Logon Form" as a child form to get the login details to a diff application. How can this be done?

If I make the Logon form as a container, its giving me the error " A form cannot be container and child..... ".Please do reply

Thanks in advance,
KMSDXB
Dec 3 '09 #1
4 1792
sanjib65
102 100+
A child window can be a parent of another control.
For example, the Standard toolbar of Visual Studio is the parent of the buttons on it. If you close or hide the toolbar, its children disappear. At the same time, the toolbar is a child of the application's frame. If you close the application, the toolbar disappears, along with its own children. In this example, the toolbar is a child of the frame but is a parent to its buttons.
http://http://www.functionx.com/vbnet/Lesson08.htm

A small example:

Expand|Select|Wrap|Line Numbers
  1. GridView gv = new GridView();
  2. //some code
  3. Panel1.Controls.Add(gv);//here gv is the child control
  4.  
Dec 3 '09 #2
KMSDXB
3
Hi,

On invoking the new form from this child form, I'm getting this message:
"Form that was specified to be the MdiParent for this form is not an MdiContainer."

Could you please guide me on this?

The piece of code is as follows:

frmLogin oLogon = new frmLogin();
oLogon.MdiParent = this; //error
oLogon.Show();
where the form frmLogin is set as a child form.
Dec 6 '09 #3
KMSDXB
3
Hi,

While invoking the new form from the child form, I'm getting the following error:
"Form that was specified to be the MdiParent for this form is not an MdiContainer."

The code is as follows:

frmLogin oLogon = new frmLogin();
oLogon.TopLevel = false;
oLogon.MdiParent = this;
oLogon.Show();

The form frmLogin is the new child form to be invoked from the current form which itself is a child.

Please guide me on this.
Dec 6 '09 #4
The error says it all, you need to creat and MDI Primary Form which will be parent for all the other forms.
Dec 11 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: F. Da Costa | last post by:
Hi, I'm trying to call/ mimic an onchange function/ event after a user has clicked a checkbox. In response to which a buncch of other ones need to be checked as well. The caveat is that each of...
3
by: CJack | last post by:
hy, I have an mdi application, i create a child form and I want to know when a button is pressed while that child form is loaded. I have this code: private void frmTestBaby_KeyUp(object...
2
by: Brindley | last post by:
Hi there, In my Mdi application, I have placed a set of controls on the parent form to call child forms. The problem is that the controls hide the child forms. I have used SendToBack when Im...
3
by: James Spibey | last post by:
Hi, I have an MDI application which has aboout 10 child windows. The way the app needs to work is that only one window should be visible at a time and it should be maximized within the parent...
3
by: Huihong | last post by:
I found when invoking the same property of a base class, the MC++ compiler seems to emit incorrect IL code, and causes causes stack overflow: class Child : public Parent { __property void...
2
by: Paul | last post by:
Hi this is related to a previous post, hopefully just a bit clearer description o the problem. I have a parent form that opens a new form (child form) while still leaving the parent form open....
2
by: QT | last post by:
Dear Sirs, I made a MDI Parent form and two MDI child form. I can open MDI child form from MDI parent form with; Dim UserChangePassword_Form As New UserChangePassword 'Set the Parent Form of...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
2
by: JohnR | last post by:
Let's say I have an MDI parent form with a textbox. If I create an MDI child form and, at runtime, move the MDI child window over the textbox on the MDI parent, the textbox appears in front of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.