Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


I found a VBC# 2005 CD on the street!

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Cryoma
Member of the Year
Reputation: 198

Joined: 14 Jan 2009
Posts: 1819

PostPosted: Thu Dec 06, 2007 2:19 pm    Post subject: I found a VBC# 2005 CD on the street! Reply with quote

Or something like that,
Anyway I've just spent an hour learning the basics, without reading the instruction. (I'm a fast learner like that)
It's my first time writing C# but it seems pretty simple.
Anyway I need help making a button on Form1 that when you click opens up Form2 in a new window.
I went to Form1.cs and made:
Code:

private void get_Form2(object sender, EventArgs e)
        {

        }

Then I set the buttons actions to
Code:

click:    get_Form2

but what code do I put in the
Code:
{

}


To make the button work?
Thankies in advance.
Back to top
View user's profile Send private message
goldengold
Grandmaster Cheater Supreme
Reputation: -1

Joined: 11 Nov 2006
Posts: 1841
Location: -.-

PostPosted: Thu Dec 06, 2007 2:49 pm    Post subject: Reply with quote

what do you want it to do?

type
Code:


Messagebox.show ("i bet you're not this leet ;D");

_________________
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Cryoma
Member of the Year
Reputation: 198

Joined: 14 Jan 2009
Posts: 1819

PostPosted: Thu Dec 06, 2007 2:53 pm    Post subject: Reply with quote

I want it to open form2 in a popup.
Btw thanks for that code, it makes a lot of sense and I understand C# a bit better.
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Thu Dec 06, 2007 2:53 pm    Post subject: Reply with quote

declare your new form.
Code:
Form2 form2 = new Form2();


put this on your button.
Code:
form2.Show();


like magic.


Last edited by hcavolsdsadgadsg on Thu Dec 06, 2007 2:56 pm; edited 2 times in total
Back to top
View user's profile Send private message
Cryoma
Member of the Year
Reputation: 198

Joined: 14 Jan 2009
Posts: 1819

PostPosted: Thu Dec 06, 2007 2:54 pm    Post subject: Reply with quote

wait, it says
Error 1 'WindowsApplication1.NMM1' does not contain a definition for 'get_Form2' C:\Documents and Settings\myname\My Documents\Visual Studio 2005\Projects\projectnameblahblah\Form1.Designer.cs 46 64 projectname


this is what I did


EDIT: OH SHI- I'M AN IDIOT.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites