About Box...

Post here about scripting and programming for HaloPC (audio, network, ai, etc.)
Post Reply
User avatar
Eaton




Enthraller

Posts: 1639
Joined: Thu Jun 14, 2007 4:16 pm
Location: USA

About Box...

Post 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
Image
User avatar
grimdoomer




System Engineer

Posts: 1440
Joined: Mon Oct 09, 2006 4:36 pm

Post 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();
Image
AI Zones in MP | Ambiance | Gravemind Beta v1.1
Aumaan Anubis wrote:Grimdoomer. The first person ever to mod Halo 2 Vista.
User avatar
Eaton




Enthraller

Posts: 1639
Joined: Thu Jun 14, 2007 4:16 pm
Location: USA

Post 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.
Image
User avatar
LuxuriousMeat





Posts: 824
Joined: Thu Nov 03, 2005 6:43 pm
Location: zzzzzzzzzzzzzzzz
Contact:

Post by LuxuriousMeat »

VB

Code: Select all

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

Code: Select all

FormName f = new FormName();
f.ShowDialog();
Image
User avatar
Eaton




Enthraller

Posts: 1639
Joined: Thu Jun 14, 2007 4:16 pm
Location: USA

Post 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
Image
User avatar
LuxuriousMeat





Posts: 824
Joined: Thu Nov 03, 2005 6:43 pm
Location: zzzzzzzzzzzzzzzz
Contact:

Post by LuxuriousMeat »

No problem.
Image
Supermodder911




Connoisseur Coroner

Posts: 1262
Joined: Sun Sep 03, 2006 10:43 pm
Location: Michigan

Post 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.
Image
C Wizzle
User avatar
Aumaan Anubis




Connoisseur Bloodhound Renovator

Posts: 2938
Joined: Fri Jun 30, 2006 1:01 pm
Location: Aumaan
Contact:

Post by Aumaan Anubis »

C'mon Grimdoomer, pick up your game!

:P
Image
Tural wrote:MrMurder, we're going to hold you to that promise.
It is expected, and demanded.
User avatar
LuxuriousMeat





Posts: 824
Joined: Thu Nov 03, 2005 6:43 pm
Location: zzzzzzzzzzzzzzzz
Contact:

Post by LuxuriousMeat »

Actually, it is a method that is ran when an event is triggered...
Image
User avatar
Aumaan Anubis




Connoisseur Bloodhound Renovator

Posts: 2938
Joined: Fri Jun 30, 2006 1:01 pm
Location: Aumaan
Contact:

Post 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
Image
Tural wrote:MrMurder, we're going to hold you to that promise.
It is expected, and demanded.
OwnZ joO




Articulatist 500

Posts: 980
Joined: Thu Nov 10, 2005 4:24 pm

Post 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.
Supermodder911




Connoisseur Coroner

Posts: 1262
Joined: Sun Sep 03, 2006 10:43 pm
Location: Michigan

Post 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. ;)
Image
C Wizzle
User avatar
Eaton




Enthraller

Posts: 1639
Joined: Thu Jun 14, 2007 4:16 pm
Location: USA

Post 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...
Image
User avatar
grimdoomer




System Engineer

Posts: 1440
Joined: Mon Oct 09, 2006 4:36 pm

Post by grimdoomer »

The click event is simply a method. All of you pick up your game :roll:
Image
AI Zones in MP | Ambiance | Gravemind Beta v1.1
Aumaan Anubis wrote:Grimdoomer. The first person ever to mod Halo 2 Vista.
Patrickssj6




Pi Collaborator

Posts: 5426
Joined: Sat Jul 24, 2004 12:12 pm
Location: I'm a Paranoid
Contact:

Post 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.
...left for good
User avatar
Aumaan Anubis




Connoisseur Bloodhound Renovator

Posts: 2938
Joined: Fri Jun 30, 2006 1:01 pm
Location: Aumaan
Contact:

Post 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.
Image
Tural wrote:MrMurder, we're going to hold you to that promise.
It is expected, and demanded.
User avatar
LuxuriousMeat





Posts: 824
Joined: Thu Nov 03, 2005 6:43 pm
Location: zzzzzzzzzzzzzzzz
Contact:

Post 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.
Image
Post Reply