473,508 Members | 2,229 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parent / Child Interaction

Hi guys

I'm sure this is really simple, but passing commands
between forms is a whole new thing to me, what I want to
do is when I load my child form I would like a menu item
on the parent to be enabled so I tried...

--\
Dim objParentForm As New MDIParentForm

objParentform.menuitem46.enabled = True
--/
in the childs loads event, with no success
regards steve

Nov 20 '05 #1
11 1393
Steve, maybe I'm missing something but in your parent form code when you
create the child, why don't you enable the menu item there too. Eg.
Private Sub createChild()
Dim f As New Form
f.MdiParent = Me
f.Show()
MainMenu1.MenuItems.Item(whatever).Enabled = True
End Sub
Regards
Hexathioorthooxalate
"Steven Smith" <an*******@discussions.microsoft.com> wrote in message
news:04****************************@phx.gbl...
Hi guys

I'm sure this is really simple, but passing commands
between forms is a whole new thing to me, what I want to
do is when I load my child form I would like a menu item
on the parent to be enabled so I tried...

--\
Dim objParentForm As New MDIParentForm

objParentform.menuitem46.enabled = True
--/
in the childs loads event, with no success
regards steve


Nov 20 '05 #2
Steve, maybe I'm missing something but in your parent form code when you
create the child, why don't you enable the menu item there too. Eg.
Private Sub createChild()
Dim f As New Form
f.MdiParent = Me
f.Show()
MainMenu1.MenuItems.Item(whatever).Enabled = True
End Sub
Regards
Hexathioorthooxalate
"Steven Smith" <an*******@discussions.microsoft.com> wrote in message
news:04****************************@phx.gbl...
Hi guys

I'm sure this is really simple, but passing commands
between forms is a whole new thing to me, what I want to
do is when I load my child form I would like a menu item
on the parent to be enabled so I tried...

--\
Dim objParentForm As New MDIParentForm

objParentform.menuitem46.enabled = True
--/
in the childs loads event, with no success
regards steve


Nov 20 '05 #3
Ok that seems like a sound idea but how do I get access
to a list of indexes with their associated menu item names
Nov 20 '05 #4
Ok that seems like a sound idea but how do I get access
to a list of indexes with their associated menu item names
Nov 20 '05 #5
"Steven Smith" <an*******@discussions.microsoft.com> schrieb

I'm sure this is really simple, but passing commands
between forms is a whole new thing to me, what I want to
do is when I load my child form I would like a menu item
on the parent to be enabled so I tried...

--\
Dim objParentForm As New MDIParentForm

objParentform.menuitem46.enabled = True
--/
in the childs loads event, with no success


I'd enable the item in the parent form when you load the child to avoid
accessing the parent from the child.
--
Armin

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

Nov 20 '05 #6
"Steven Smith" <an*******@discussions.microsoft.com> schrieb

I'm sure this is really simple, but passing commands
between forms is a whole new thing to me, what I want to
do is when I load my child form I would like a menu item
on the parent to be enabled so I tried...

--\
Dim objParentForm As New MDIParentForm

objParentform.menuitem46.enabled = True
--/
in the childs loads event, with no success


I'd enable the item in the parent form when you load the child to avoid
accessing the parent from the child.
--
Armin

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

Nov 20 '05 #7
sorry that was a silly question since menu's are arranged
in a heirarichal structure the indexes are obviously
built in the same fashion, so there's no need for me to
access the collection, thanks for your help
Nov 20 '05 #8
sorry that was a silly question since menu's are arranged
in a heirarichal structure the indexes are obviously
built in the same fashion, so there's no need for me to
access the collection, thanks for your help
Nov 20 '05 #9
If this is the same Stephen Smith that was posting a few months ago and
working from a step by step book, you seem to have come a long way. If its
you, keep up the good work.

OHM

Steven Smith wrote:
Hi guys

I'm sure this is really simple, but passing commands
between forms is a whole new thing to me, what I want to
do is when I load my child form I would like a menu item
on the parent to be enabled so I tried...

--\
Dim objParentForm As New MDIParentForm

objParentform.menuitem46.enabled = True
--/
in the childs loads event, with no success
regards steve

Nov 20 '05 #10
Yip still the same me...

the force grows stronger inside me with every day that
passes, thanks for all your help at the beggining of my
journey.

regards steve
Nov 20 '05 #11
* "Steven Smith" <an*******@discussions.microsoft.com> scripsit:
I'm sure this is really simple, but passing commands
between forms is a whole new thing to me, what I want to
do is when I load my child form I would like a menu item
on the parent to be enabled so I tried...

--\
Dim objParentForm As New MDIParentForm

objParentform.menuitem46.enabled = True
--/


\\\
DirectCast(Me.MdiParent, MDIParentForm).MenuItem46.Enabled = True
///

Make sure, the menuitems 'Modifier' property is set to 'Friend' or
'Public'.

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

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

Similar topics

1
9110
by: ahaideb | last post by:
I have a table (relation) in my database: --------------- | parent | child | --------------- | 1 | 2 | | 1 | 3 | | 2 | 4 | | 2 | 5 ...
6
10962
by: jalkadir | last post by:
Let's say that I have this class: class Parent{ private: char* str; public: const char* getStr(){return str;} }; And then I create a child class class Child{ private: std::string str;...
1
2232
by: Tomas Vera | last post by:
Hello All, I'm working on a web app that will simulate a Windows app. One of the items that I've trouble reproducing is the parent/child interaction that might occur between a windo and popup...
4
4547
by: Danny Tuppeny | last post by:
Hi all, I've been trying to write some classes, so when I have a parent-child relationship, such as with Folders in my application, I don't have to remember to add a parent reference, as well as...
0
279
by: Steven Smith | last post by:
Hi guys I'm sure this is really simple, but passing commands between forms is a whole new thing to me, what I want to do is when I load my child form I would like a menu item on the parent to...
10
3984
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...
7
2012
by: msxkim | last post by:
How to execute functions in the parent class first and then functions in the child class? For example, I have a parent class with functions 'ONE' and 'TWO' and child class has a function 'THREE'. ...
7
2528
by: Paul | last post by:
Hello, I'm coming from a PHP background and am working on a large-scale VB.NET project. One of the cornerstones of this project is a reusable form class, to standardize our web forms. My goal...
4
8237
by: jewel87 | last post by:
Hi everyone! I'm writing some code in C under UNIX, which should give some output like this: PARENT: pid = 10063 CHILD: my pid = 10064 CHILD: my parent's pid = 10063 CHILD: Sleeping... PARENT:...
0
7129
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
7333
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
7398
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
7502
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...
0
5637
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,...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1566
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 ...
1
769
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.