C# button on a form

i'm trying to make a form i have the form and the about box made i just need to assign the about box to the about button on the form does anybody know how to do that

8 answers
sort by: active | newest | oldest
Dec 13, 2010. 8:59 PMrocketsurgery says:
Hey hightekrednek2396...

The issue many people struggle with, regarding C#, is that the forms are actually classes... you can only use instance members... you need to first create a new instance of that class (object) to play with it... so say your about form is Form2...

Form2 frmAbout = new Form2(); // create the instance of your form
frmAbout.Show(); // do something with it

There are many communities on the web to help with the basics of C# etc... use google to find a good one... and enjoy their experience and resources.
Dec 14, 2010. 10:18 AMrocketsurgery says:
Yes... you will have to make an instance of the about form... I guessed that it may have been called Form2 by default... use whatever it was called by default... or whatever you named it...

NAMEOFABOUTFORM frmAbout = new NAMEOFABOUTFORM();
Dec 14, 2010. 7:23 PMrocketsurgery says:
:) I think it's time you used the power of google (faster answers and as you are new to C# the communities that you find will be very helpful)... All the best...
Dec 15, 2010. 1:38 AMrocketsurgery says:
Like any language, you learn it best by using it... personally I would recommend playing with some tutorials first (there are lots on the web)... read some example code to see how it works... forums like that of the codeproject or CodeGuru are great. Programming books are written in different ways... some will fit well with your learning style... check them out at your local library.

Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!