473,626 Members | 3,294 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parent/Child Forms

102 New Member
I have a Parent Form (form1) that starts a child form (form2). Can the child form (form2) execute a routine that is already defined in the parent form (form1)? In my case the routine is one that displays a data grid view. If it can be done, how?

Thanks in advance.
Apr 4 '18 #1
1 2974
SioSio
272 Contributor
Declare the subroutine you want to share as Public

Expand|Select|Wrap|Line Numbers
  1. Form1
  2.  
  3. Public Sub CALLMSGBOX()
  4. MsgBox("Form1:CALLMSGBOX")
  5. End Sub
  6.  
  7. Form2
  8. :
  9. My.Forms.Form1.CALLMSGBOX()
  10. :
Dec 17 '19 #2

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

Similar topics

1
3327
by: jinu | last post by:
Hello, My application loads with a form which is the mdi parent and a menu item click (main menu of the parent form) brings up a child form. I have to wait for a considerable amout of time to execute an oracle procedure which has to be invoked from the above said child form. The problem now is, during this waiting time, my mdi parent's menu is appearing to be not responding (becoming white in simple words). Once the oracle procedure is...
2
3077
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 calling the child form, that works fine. The problem arrises when I want to show those controls again when I close the child form. Im sure BringToFront will work but im not sure how to do this from the child form.
8
4174
by: al | last post by:
Greetings, If I instansiate child forms in MDI parent, what is the way to close them. I can't find an event related to child to do such task. I want to close 3 child forms, all in the same parent. MTIA, Grawsha
6
9414
by: Edwinah63 | last post by:
Hi everyone, could someone give me some thoughts on the best way to manage mdi parent and child forms? in vb6 i could scroll through the forms collection and determine which forms were open/closed and their current state. now i can't. before i didn't have to declare numerous named instances each time i loaded or unloaded a form.
0
486
by: Bill | last post by:
Hi I have a parent child forms. I want the close, maximize, and minimize buttons to be removed. One the child form I have set the maximize and minimize buttons to false. I have the child form mamiximze in the parent form. So then the maximized button is still active. But I want the child form to fill the parent form without the ability to close minimize or maximize the form like a default page.
2
3088
by: Linda U | last post by:
This is what I have - Form1 is an MDI Container, form2 is an MDI Child of form1, Form3 is a model form. What I want to be able to do is activte form2 as a child of form1 from form3. The problem is that form3 is not a child of form1 so I have no way of setting the mdiParent property from form2. Does anyone know how to set the parent property in this instance? The other thing that would work is if you could have a model child form, but...
0
2282
by: Scott H. | last post by:
I have an MDI parent form that creates mdi child forms each of which are represented by a tab item. I use a third party control to generate the tabbed MDI child forms. Each tab or MDI child form displays information regarding a specific asset that is determined by an asset number. The asset numbers are entered through a global tool bar. I can enter an asset number and then display several MDI child forms. For example: I can display...
4
3619
by: raj_genius | last post by:
I hav two queries, whc are as follows: FIRSTLY: is it possible to access the controls(by name) of a parent form(MDI) from its child forms??if yes then how??plzz provide a coded example in VB if possible.. for example..i hav a menu in the parent form named "Administrator" whic has an item "mnuLogIn"..now when i click on login..another child form named "frmLogIn" is displayed..what i want to happen is this: when login form(frmLogIn) is...
4
2039
by: VIKKI | last post by:
hi I want to know different types way for calling child forms in a particular project.....I'm new to C# language and I'm not able to add child form in my project so plz anyone can tell me how to work wid child forms and mdi forms.......
0
1052
by: sajidali | last post by:
i am using 2 forms in my application. i am using one form as parent and one as child, i want that when child is opened user can not close the parent. in order to close parent form, u have to close child first. how this is possible using .Net C#? PLease let me know thanx in advance
0
8262
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8701
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8637
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8364
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8502
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7192
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4196
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2623
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
1807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.