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 


[C#] ListBox

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Sneak
Grandmaster Cheater Supreme
Reputation: 0

Joined: 05 Nov 2008
Posts: 1895

PostPosted: Sun Dec 13, 2009 11:32 am    Post subject: [C#] ListBox Reply with quote

I have an injector ive made, and everything works fine. I just would like to have whatever is selected in ListBox2 to appear in textBox1.

Ive tried ListBox2.SelectedItem = textBox1.text; No error, but it doesnt work when I double click it and it wont show up in textbox.


Please and thanks Very Happy

_________________
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sun Dec 13, 2009 2:45 pm    Post subject: Reply with quote

It might have something to do with the fact you don't quite know how '=' works...

Might....
Back to top
View user's profile Send private message
Sneak
Grandmaster Cheater Supreme
Reputation: 0

Joined: 05 Nov 2008
Posts: 1895

PostPosted: Sun Dec 13, 2009 2:57 pm    Post subject: Reply with quote

ive used = before lol. and it isnt a bool statement, so no need for the '=='.
_________________
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sun Dec 13, 2009 4:04 pm    Post subject: Reply with quote

a = b assigns a as the value of b.. have a think
Back to top
View user's profile Send private message
hacksign23
Master Cheater
Reputation: 0

Joined: 26 Nov 2006
Posts: 404

PostPosted: Mon Dec 14, 2009 3:43 am    Post subject: Reply with quote

text goes first.
you wrote ListBox2.SelectedItem = textBox1.text
it's supposed t be
textBox1.text == ListBox2.SelectedItem

_________________
Back to top
View user's profile Send private message AIM Address
LolSalad
Grandmaster Cheater
Reputation: 1

Joined: 26 Aug 2007
Posts: 988
Location: Australia

PostPosted: Mon Dec 14, 2009 5:32 am    Post subject: Reply with quote

hacksign23 wrote:
text goes first.
you wrote ListBox2.SelectedItem = textBox1.text
it's supposed t be
textBox1.text == ListBox2.SelectedItem


Now you're bringing about more confusion. He wants
Code:
textBox1.text = ListBox2.SelectedItem;

_________________
Back to top
View user's profile Send private message MSN Messenger
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Mon Dec 14, 2009 8:13 am    Post subject: Reply with quote

Wahoa wrote:
hacksign23 wrote:
text goes first.
you wrote ListBox2.SelectedItem = textBox1.text
it's supposed t be
textBox1.text == ListBox2.SelectedItem


Now you're bringing about more confusion. He wants
Code:
textBox1.text = ListBox2.SelectedItem;

huh?!
when did i write that i'm a faggot?!
and for the topic
another thing is
textbox1.Text = listBox1.Items[listBox1.SelectedIndex].ToString();
Back to top
View user's profile Send private message
hacksign23
Master Cheater
Reputation: 0

Joined: 26 Nov 2006
Posts: 404

PostPosted: Mon Dec 14, 2009 11:51 pm    Post subject: Reply with quote

HAHA it's a siggy that mods can use.
it shows the viewer's username there.
don't worry.
and yea. ToString() is probably necessary. I have bad memory.
And oops my bad.
I have no idea why I put ==.
Neutral

_________________
Back to top
View user's profile Send private message AIM Address
WaffleMaster
Grandmaster Cheater Supreme
Reputation: 0

Joined: 19 Oct 2006
Posts: 1237

PostPosted: Sat Dec 19, 2009 7:47 pm    Post subject: textBox1.text = ListBox2.SelectedItem;[/code] Reply with quote

Code:
textBox1.Text = (string)ListBox1.SelectedItem;

much easier

and the assignment operator basically does the same thing as it does in math
Code:
x = 2

_________________
Problem, CEF?

Buying zhelms/leech in Windia. PM me.
Back to top
View user's profile Send private message AIM Address
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