Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Delphiscn - 17 Mar 2008 13:59 GMT
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.
Paul E Collins - 17 Mar 2008 14:35 GMT
> How to show a ABOUT Form????????

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

Eq.
Peter Duniho - 17 Mar 2008 18:38 GMT
>> 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
Paul E Collins - 17 Mar 2008 22:43 GMT
> 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.
Mythran - 17 Mar 2008 21:19 GMT
>> 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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.