473,545 Members | 1,938 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parent Form to call child form

How do I open a child form in my parent form. I enter the child form name
but there is no show method in the intelli-sense.
Nov 21 '05 #1
2 1718
> How do I open a child form in my parent form. I enter the child form name
but there is no show method in the intelli-sense.


In VB 6, you would do this:

frmChild.Show

But in VB.NET, you have to create an instance of your child form first:

Dim f As New frmChild()
f.Show()

If you want to show your child form modally:

Dim f As New frmChild()
f.ShowDialog()
--
Peace & happy computing,

Mike Labosh, MCSD

"Mr. McKittrick, after very careful consideration, I have
come to the conclusion that this new system SUCKS."
-- General Barringer, "War Games"
Nov 21 '05 #2
"Mike L" <Ca***@nospam.n ospam> schrieb:
How do I open a child form in my parent form. I enter the child form name
but there is no show method in the intelli-sense.


\\\
Dim f As New FooForm()
f.Show()
///

In VB 2005:

\\\
My.Forms.FooFor m.Show()
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

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

Similar topics

5
5039
by: Lyn | last post by:
Hi, I hope someone can help. I have a main form which mostly fills the Access window. In the bottom half of this form I have a tab control to display various types of data related to the main form record. In each page of the tab control, there are three buttons: Add, Update, Delete. Any of these buttons will open another, smaller form...
3
3934
by: Omar Llanos | last post by:
I have Form1 and Form2 (which is inherited from Form1), and I created a button in Form2 that will fill up a textbox in Form1. What code would do that? I tried the simplest way: //from child form in button2 clicked event: textbox1.Text = "Hello";
5
1843
by: Steven C | last post by:
Hello: I've seen several recent threads on this, but I'm still not clear how to reference a *method* on one form from another. I want to add a customer in the child form, and then update the customers grid in the parent form. frmCustomers is the parent, and frmAddCustomer is the child. In frmCustomers, when the user clicks the ADD...
0
1345
by: RT | last post by:
Hi, I am new to vb .net. How do I access a parent menu from a a child form? I want to enable the parent menu item when the child form is closed. Thanks. RT
5
1547
by: BrianDH | last post by:
Hi I had never had to do this and it took me a while to work it out. Just thought I would post it to maybe help someone else with the same issue: http://www.wizkil-webs.net/NET/DotNet_VB_Samples.htm#_Toc87157881 http://www.wizkil-webs.net/NET/DotNET_Code_Samples.htm BrianDH
0
2328
by: Ben | last post by:
Please excuse if this ends up being a double post at some point. I tried posting using another website which crashed, so I am not sure if it will ever get posted. As such I decided to try again on another site. I am having a small problem that I am hoping someone might be able to help me with. I am creating an MDI based application,...
3
15216
by: jimcolli | last post by:
I have a parent form with a menu button that has a handler. I want to call this same handler when a button on a child form is clicked. I have this simplified code in the main form's Load handler. public class frmMain { private System.Windows.Forms.Button btnClickMe;
1
1086
by: ramkarthik99 | last post by:
am really confused in designing a MDI parent form and Child form. help me out
2
9633
by: =?Utf-8?B?U2FpbXZw?= | last post by:
Hi and Hello. Im new at .net framework. Now Im using C# . I have a little problem. How can I get a value of a text in the mdi parent form to child form. Example in VB6: form1.text1.text = MainForm.text1.text How to convert it to C#
0
7467
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7401
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7807
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7419
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7756
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
1879
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1014
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
703
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.