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

open a new form that will added to an existing one...

oo
Hi all,
I am relatively new to .NET and C#.
I am trying to open an additional (new) form when a button is clicked
on an already existing form, but i want that this winform will be
added to the first winform (from Basic to advanced window).
How do i do this?
Thanks in advance
Nov 16 '05 #1
5 4218
Hi,

I guess you want to create an MDI (Multiple Document Interface) form which
has it's child forms.
To do this, follow these steps:
1. set the IsMdiContainer property of the parent form to true.
2. Create your child form and set it's MdiParent property to the parent form.

HTH,
Rakesh Rajan

"oo" wrote:
Hi all,
I am relatively new to .NET and C#.
I am trying to open an additional (new) form when a button is clicked
on an already existing form, but i want that this winform will be
added to the first winform (from Basic to advanced window).
How do i do this?
Thanks in advance

Nov 16 '05 #2
Thanks for the replay, but this is not what I meant.
My question is:
I want that the new form will be connected to the exiting form - that it
will look like it is the same form. Like a basic display and when I will
press a button I will get an advanced display (same border and when I
will change the size of one form the size of the other one will be
change automatically...)
I hope this is clearer
Waiting for your answer
Thanks again


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3
Hi,

I guess you will have to do that programmatically. AFAIK there is no direct
method to do that.

You could easiliy have an instance in the second form and then manipulate
the first one. Won't that do?

HTH,
Rakesh Rajan

"osnat o" wrote:
Thanks for the replay, but this is not what I meant.
My question is:
I want that the new form will be connected to the exiting form - that it
will look like it is the same form. Like a basic display and when I will
press a button I will get an advanced display (same border and when I
will change the size of one form the size of the other one will be
change automatically...)
I hope this is clearer
Waiting for your answer
Thanks again


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #4
Hi,

If I understand you correctly you can do this by putting all controls for
one form on a single panel or container control (custom control) of your
choice and the controls for the other form on another panel/container. At
the click of the button, the panels will switch visibility, hiding one and
showing the other panel.

Happy Coding!
Morten Wennevik [C# MVP]

"osnat o" <oo****@hotmail.com> skrev i melding
news:ux**************@tk2msftngp13.phx.gbl...
Thanks for the replay, but this is not what I meant.
My question is:
I want that the new form will be connected to the exiting form - that it
will look like it is the same form. Like a basic display and when I will
press a button I will get an advanced display (same border and when I
will change the size of one form the size of the other one will be
change automatically...)
I hope this is clearer
Waiting for your answer
Thanks again


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #5
If you really want it to look like one form, then put all the information on
one form. It can start with the "advanced" controls hidden, and the form
size smaller so they don't show. Then on the click, show the hidden
controls, and change the size of the form so they will fit.

Yes, the advanced controls at least should be on their own panel (or
similar.) So you say something like foreach( Control c in panel1.Controls)
{ c.Show(); }
and also something like
Form1.Height += panel1.Height;
when you want to show the advanced information.

-Rachel

"Morten Wennevik" <Mo************@hotmail.com> wrote in message
news:Ol**************@TK2MSFTNGP09.phx.gbl...
Hi,

If I understand you correctly you can do this by putting all controls for
one form on a single panel or container control (custom control) of your
choice and the controls for the other form on another panel/container. At
the click of the button, the panels will switch visibility, hiding one and
showing the other panel.

Happy Coding!
Morten Wennevik [C# MVP]

"osnat o" <oo****@hotmail.com> skrev i melding
news:ux**************@tk2msftngp13.phx.gbl...
Thanks for the replay, but this is not what I meant.
My question is:
I want that the new form will be connected to the exiting form - that it
will look like it is the same form. Like a basic display and when I will
press a button I will get an advanced display (same border and when I
will change the size of one form the size of the other one will be
change automatically...)
I hope this is clearer
Waiting for your answer
Thanks again


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 16 '05 #6

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

Similar topics

1
by: Daniel Diehl | last post by:
Hi there, just a short question. How can I get access to a open form (is also the MDI parent)? <FORMNAME>.<FUNCTION> does not work but I have to call a method in the mainForm of the Application to...
2
by: allyn44 | last post by:
Hello, I have built a serch form for users to edit records. I only want them to pull up the record they need, and I want to check for nulls. There should not be dupes becasue the underlying...
2
by: erick-flores | last post by:
Hello all Form A (pk) & Form B (fk) I want to display my Form B empty whenever is the first time, that the pk form Form A, is enter. I click a button to open Form B. BUT if the pk from Form A...
1
by: starke1120 | last post by:
Is there a way to open a form based on query type.. Example.. If a certain query result is 1 then open the form to this result.. If the query results are NULL or 0 results, then open open for...
14
by: keri | last post by:
Hi, Simple version of the question..... How do I use the where clause of the open form command to show an account with a matching ID to be displayed when the form is opened? Eg. I select a...
1
by: Derek Basch | last post by:
I spent several hours struggling with dynamic form fields added with appendChild or innerHTML not POSTing on submit in Firefox. The only way I found to make it work is to append any created fields...
0
by: vidhyapriya | last post by:
Hi all, I am using two forms.From form1 button click i am opening form2,and i am passing values to form2 using delegate.when i click the button again form2 shouldn't open again but values...
5
by: billa856 | last post by:
Hi, My project is in MS Access 2002. In that I want to open one form multiple times. I put one button on my main form. Now whenever I click on that button than form will be open. Now when I...
1
by: ielamrani | last post by:
Hi, I have the following code which works fine. It export current access form record to an excel sheet: DoCmd.OutputTo acOutputForm, "frmsubformtest", acFormatXLS, "C:\Details.xls", True Is it...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.