Page 1 of 1

About Box...

Posted: Wed Mar 19, 2008 1:00 pm
by Eaton
Hello. I'm clicking "Project", then "Add Module", then I add an about box to my project, BUT how can I make it so when I click a button it will load? I've tried copy and pasting the AboutBox1 code over the button click code, but no luck. :x

I'm using Visual Studio 2008.

Thank you to the people who help! :D

Posted: Wed Mar 19, 2008 1:10 pm
by grimdoomer
Make it a form and name it AboutForm, then add this in the button click method:

Code: Select all

AboutForm About = new AboutForm();
About.Show();

Posted: Wed Mar 19, 2008 1:33 pm
by Eaton
grimdoomer wrote:Make it a form and name it AboutForm, then add this in the button click method:

Code: Select all

AboutForm About = new AboutForm();
About.Show();
I did that, but it said that most of your code was not declared.

Posted: Wed Mar 19, 2008 1:37 pm
by LuxuriousMeat
VB

Code: Select all

Dim f as New FormName
f.ShowDialog()
C#

Code: Select all

FormName f = new FormName();
f.ShowDialog();

Posted: Wed Mar 19, 2008 2:02 pm
by Eaton
LuxuriousMeat wrote:VB

Code: Select all

Dim f as New FormName
f.ShowDialog()
C#

Code: Select all

FormName f = new FormName();
f.ShowDialog();
Ah! :D That's what I'm looking for! It worked. Thanks you both for helping! :D

Posted: Wed Mar 19, 2008 5:58 pm
by LuxuriousMeat
No problem.

Posted: Wed Mar 19, 2008 7:11 pm
by Supermodder911
grimdoomer wrote:Make it a form and name it AboutForm, then add this in the button click Event:

Code: Select all

AboutForm About = new AboutForm();
About.Show();
Fixed.

Posted: Wed Mar 19, 2008 7:22 pm
by Aumaan Anubis
C'mon Grimdoomer, pick up your game!

:P

Posted: Wed Mar 19, 2008 8:15 pm
by LuxuriousMeat
Actually, it is a method that is ran when an event is triggered...

Posted: Wed Mar 19, 2008 8:20 pm
by Aumaan Anubis
Yes, but the actual click of the button is an event...

Oh wait, you mean like, the method is related to the button, and therefore the button click method...
Either way, you put that code within the Event, not within the method.

ahhh....

In either case,

Supermodder, pick up your game!

:P

Posted: Wed Mar 19, 2008 8:34 pm
by OwnZ joO
LuxuriousMeat wrote:Actually, it is a method that is ran when an event is triggered...
I think event handler is the word everyone's looking for.

Posted: Wed Mar 19, 2008 11:44 pm
by Supermodder911
OwnZ joO wrote:
LuxuriousMeat wrote:Actually, it is a method that is ran when an event is triggered...
I think event handler is the word everyone's looking for.
*Picks up game*
But that's two words. ;)

Posted: Thu Mar 20, 2008 5:31 am
by Eaton
Wow. A lot of replies. Ok. I will use the fixed code Supermodder posted. Just one more question... How can I make it so my about box displays my own custom text? I type in text, but I run it, it displays the assembly information and not my custom text...

Posted: Thu Mar 20, 2008 10:20 am
by grimdoomer
The click event is simply a method. All of you pick up your game :roll:

Posted: Thu Mar 20, 2008 10:31 am
by Patrickssj6
Eaton wrote:Wow. A lot of replies. Ok. I will use the fixed code Supermodder posted. Just one more question... How can I make it so my about box displays my own custom text? I type in text, but I run it, it displays the assembly information and not my custom text...
Look inside the AboutBox code...there should be a line declaring the label to use the assembly information. Just replace it with your own.

Posted: Thu Mar 20, 2008 10:39 am
by Aumaan Anubis
Eaton wrote:Ok. I will use the fixed code Supermodder posted.
His code isn't fixed. It was fine as it was. He was trying to tell Grim that the click of a button is an event, not a method. Which, by the way, is why he bolded "event," in his "fixed code" post.

Posted: Thu Mar 20, 2008 11:34 am
by LuxuriousMeat
No...It is just a method which is called when an event is triggered... The event handler is what calls the specified method.