473,396 Members | 1,784 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.

MDI parrent select

sry for the title of previues message

Worksheet(formcount).MdiParent = Form1

i get an erro by form 1 he sais it is a type and con't be used as expresion1
but when i run this code from the MDI form and i type
Worksheet(formcount).MdiParent = Me

then the code is working

why ? and how wil i get it to work

thank you Maarten


Nov 21 '05 #1
4 1026
Maarten,

Supposing that Form1 is the class name of your Form.

Could you ever do on any other place this
myobject = myclass?

Me is the object of your form.

Cor
Nov 21 '05 #2
thanks for the reply

but how wil i be able to tell in form3 tha the parent form of form2 is
form1?

thanks

"Cor Ligthert" <no************@planet.nl> wrote in message
news:u2**************@TK2MSFTNGP10.phx.gbl...
Maarten,

Supposing that Form1 is the class name of your Form.

Could you ever do on any other place this
myobject = myclass?

Me is the object of your form.

Cor

Nov 21 '05 #3
Maarten,

Depends where, you can use activemdi, mdiparent, mdichildren have a look at
the form members.

http://msdn.microsoft.com/library/de...mberstopic.asp

Cor
Nov 21 '05 #4
"Maarten" <gu******@hotmail.com> schrieb:
sry for the title of previues message

Worksheet(formcount).MdiParent = Form1

i get an erro by form 1 he sais it is a type and con't be used as
expresion1
but when i run this code from the MDI form and i type
Worksheet(formcount).MdiParent = Me

then the code is working


What you need is a reference to your instance of the MDI container. Inside
the MDI container, this reference is avalilable through 'Me'. Outside the
container form it's not available by default. You'll have to make the
reference available to the class/method where you are attempting to set the
MDI parent, for example, by passing it to a method in a parameter or by
setting a reference to the MDI container instance. An alternative approach
would be implementing the Singleton design pattern with the MDI container in
order to easily access it.

If you want to set the MDI parent for a form from within another MDI child,
you can use this code:

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

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #5

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

Similar topics

1
by: JT | last post by:
I have an input form for which I've created a "matrix" for user input. Basically, the user chooses a radio button and then through javascript, a select box is displayed to define a value for that...
21
by: John Fabiani | last post by:
Hi, I'm a newbie and I'm attempting to learn howto create a select statement. When I use >>> string1='18 Tadlock Place' >>> cursor.execute("SELECT * FROM mytest where address = %s",string1) All...
0
by: Bart Plessers \(artabel\) | last post by:
Hello, I have a small script were a variable called "MyURL" is used MyURL = "/xxx/yyy/zzz/" Now I want to find it's parrent URL. The result should be ParrentURL = "/xxx/yyy/" What is the...
3
by: Memduh Durmaz | last post by:
Hi, I'm using DB2 UDB 7.2. Also I'm doing some tests on SQL Server 2000 for some statements to use efectively. I didn't find any solution on Sql Server about WITH ... SELECT structure of DB2. ...
4
by: point | last post by:
Hello there... I'm a PHP programmer and starting to learn JS... I have a following problem.... I have 3 select boxes! one is hotel one is destination and one is country... if someone...
10
by: serge | last post by:
Using "SELECT * " is a bad practice even when using a VIEW instead of a table? I have some stored procedures that are identical with the difference of one statement in the WHERE clause. If I...
2
by: authorking | last post by:
If there's a control in a MDI parrent form , how can I make it accessable in a MDI child form? Is there any sample code?
4
by: Maarten | last post by:
i have a parrent form, form1 and i child form, form2 when i press a button in form2, tha data of the text1 of form2 must be places in text1 of form1 something like form1.text1 =...
1
by: serena.delossantos | last post by:
Trying to insert into a history table. Some columns will come from parameters sent to the store procedure. Other columns will be filled with a separate select statement. I've tried storing the...
6
by: Apaxe | last post by:
In the database i have a table with this information: key_id =1 key_desc =43+34+22+12 I want sum the values in key_desc. Something like: SELECT key_desc FROM table But the result of...
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
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?
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
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
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...
0
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,...

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.