By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,929 Members | 634 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,929 IT Pros & Developers. It's quick & easy.

How to show a ABOUT Form????????

P: n/a
How to show a ABOUT Form????????

Hello Everyone:
I use C# want to Create a Project. In my project. there are two
forms. One is main form, and another is a about form. In the about
form there are some information about my project. such as author's
information, product support and so on.
Now, I add a button in the main form, I want that if the user click
the button. It will show the about form . In button's event . the code
like this:
{
about.show();
}
but it doesn't work, if in Delphi. It will be work.
After that, I search the msdn. I know that there is a method called
AddOwnedForm(); so I coded the code like below:
{
Form cs =new Form();
this.AddOwnedForm (cs);
cs.Show();
}
This can show a new Form , but it is not the about form....
What I should do? I'm very sorry for my English , I 'm from China.
Mar 17 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"Delphiscn" <De*******@gmail.comwrote:
How to show a ABOUT Form????????
MyAboutForm f = new MyAboutForm();
f.ShowDialog(this);

Eq.
Mar 17 '08 #2

P: n/a
On Mon, 17 Mar 2008 06:35:23 -0700, Paul E Collins
<fi******************@CL4.orgwrote:
"Delphiscn" <De*******@gmail.comwrote:
>How to show a ABOUT Form????????

MyAboutForm f = new MyAboutForm();
f.ShowDialog(this);
Hmph. Not only did the OP multi-post (in m.p.dotnet.framework at
least...I wonder how many other newsgroups he hit), but the reply in that
other newsgroup had the same error the above reply has. No dispose!

To the OP, please see my reply in m.p.dotnet.framework for an explanation
as to the correct way to do this. And please don't multi-post again. If
you must post the same question to more than one newsgroup, learn how to
cross-post correctly.

Pete
Mar 17 '08 #3

P: n/a


"Paul E Collins" <fi******************@CL4.orgwrote in message
news:f-*********************@bt.com...
"Delphiscn" <De*******@gmail.comwrote:
>How to show a ABOUT Form????????

MyAboutForm f = new MyAboutForm();
f.ShowDialog(this);

Eq.

- or -

using (MyAboutForm f = new MyAboutForm()) {
f.ShowDialog(this);
}

To release any unmanaged resources created/maintained by the form's code.

HTH,
Mythran
Mar 17 '08 #4

P: n/a
"Peter Duniho" <Np*********@nnowslpianmk.comwrote:
the reply in that other newsgroup had the same error the above reply
has. No dispose!
Oops, yes. I was trying to keep it simple, I suppose, but without
Dispose it's incomplete.

Eq.
Mar 17 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.