473,395 Members | 1,763 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,395 software developers and data experts.

setting 2nd form as a child form, from first child form

Rat
Hi,

For example in my vb.net application i am having

MdiMain Form -- 1 (Parent mdiform)
FrmOne Form -- 2 (Child Form to MdiMain)
FrmTwo Form -- 3 (normal form to be converted to child
Form)

Here from MdiMain Form if i access FrmOne using the
following code. (For converting as a child Form)

Dim form1 As New FrmOne()
form1.MdiParent = Me
form1.Show()

The above code is working fine.

But the problem starts here,,,

i am accessing a file from a menu i.e FrmOne(Child form).

From FrmOne i am access FrmTwo. How will i create FrmTwo
as a Child Form to MdiMain Form.

Regards and Thanks in advance,
Rat

Nov 20 '05 #1
2 1417
"Rat" <an*******@discussions.microsoft.com> schrieb
For example in my vb.net application i am having

MdiMain Form -- 1 (Parent mdiform)
FrmOne Form -- 2 (Child Form to MdiMain)
FrmTwo Form -- 3 (normal form to be converted to child
Form)

Here from MdiMain Form if i access FrmOne using the
following code. (For converting as a child Form)

Dim form1 As New FrmOne()
form1.MdiParent = Me
form1.Show()

The above code is working fine.

But the problem starts here,,,

i am accessing a file from a menu i.e FrmOne(Child form).

From FrmOne i am access FrmTwo. How will i create FrmTwo
as a Child Form to MdiMain Form.


Where do you create FrmTwo? I guess in FrmOne:

dim form2 as new frmTwo
form2.mdiparent = me.mdiparent
form2.show
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
* "Rat" <an*******@discussions.microsoft.com> scripsit:
For example in my vb.net application i am having

MdiMain Form -- 1 (Parent mdiform)
FrmOne Form -- 2 (Child Form to MdiMain)
FrmTwo Form -- 3 (normal form to be converted to child
Form)

Here from MdiMain Form if i access FrmOne using the
following code. (For converting as a child Form)

Dim form1 As New FrmOne()
form1.MdiParent = Me
form1.Show()

The above code is working fine.

But the problem starts here,,,

i am accessing a file from a menu i.e FrmOne(Child form).

From FrmOne i am access FrmTwo. How will i create FrmTwo
as a Child Form to MdiMain Form.


In 'FrmOne':

\\\
Dim f As New FrmTwo()
f.MdiParent = Me.MdiParent
f.Show()
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Doug | last post by:
I use this code to open a form as a mdi child form from a mdi form menu option and it works fine frmPolicy = New Polic frmPolicy.MdiParent = M frmPolicy.Show( On the child form (frmPolicy) I...
9
by: TD | last post by:
I am trying to add transactions to my code. The original code worked fine until I followed an example to setup transactions, now the code does strange things, but no error messages. Could...
8
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 sender,...
2
by: Mystery Man | last post by:
We have an MDI application that is not setting always setting focus to the newly corrected MDI. It is creating the form and it is the topmost but it does not have focus. The code we are using to...
11
by: alex | last post by:
Hi, how can I access / set properties of controls in other forms. i.e. mdi parent of mdi child mdi child of mdi child mdi child of mdi parent Thanks Alex
2
by: SHAWN DEB ECKLEY | last post by:
Here is my situation... i have a parent window/ main app and i call a child form (type 1). the child form(type 1) gets information from a database. the user makes some choices and then some data...
4
by: Duncan | last post by:
Hi I'm learning c# 2.0 as I feel I need to be able to switch between vb & c#, I'm just starting with a few simple examples and I've come across a problem. I've got two forms ones an MDI parent &...
4
by: Harlequin | last post by:
I have a question concerning the need to trigger events within a "child" subform which is itself enbedded within a master "parent" form and which is accessible via a tab in the parent form. Becuase...
0
by: Andy | last post by:
Hello all, I have a user getting an error 438, object doesn't support this prop. or method, when I run code to setup the treeview control. I'm using the MSCOMCTRL.OCX, file version: 6.01.9545....
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.