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 


[VB.net] 2 Questions [SOLVED]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
I'm C.H.
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Dec 2006
Posts: 1000
Location: Sweden

PostPosted: Sun Dec 14, 2008 7:11 pm    Post subject: [VB.net] 2 Questions [SOLVED] Reply with quote

1. Well, I need some help with my ErrorHandler.
I want to have a textbox with a text in for something, let's say Gamble for example. Now I want my Errorhandler to display an error message if you say something else than Gamble which I already have made. The problem is, how can I make it non-sensitive for caps lock? So it doesn't deliver error messages when typing: GAmble, GAMBLE, gAMBLE ect... No, I don't want to type alot of "Or TextBox6.Text = GAMBLE" and so on -.-

2. I want to make a textbox code where it's supposed to be that you put a letter first and then the value. Example:

'M: 15' for one character and 'L: 15' for another. The value of the variable is 15 and the text L: and M: is just for the differances of the characters. So how can I make it be able to do that?

_________________
Omg. I need something to do...

*-* My Flash Trainers *-*

*-* My Mouse Vac Tut *-*



Last edited by I'm C.H. on Tue Dec 16, 2008 11:03 am; edited 1 time in total
Back to top
View user's profile Send private message
hacksign23
Master Cheater
Reputation: 0

Joined: 26 Nov 2006
Posts: 404

PostPosted: Sun Dec 14, 2008 9:52 pm    Post subject: Reply with quote

?? doesn't make much sense. I could help you if it made sense.
_________________
Back to top
View user's profile Send private message AIM Address
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Dec 14, 2008 9:58 pm    Post subject: Reply with quote

1. Look at the String.Compare method, you can set if you want it to be case sensitive or not.

2. I don't really get what you're trying to do
Back to top
View user's profile Send private message
hacksign23
Master Cheater
Reputation: 0

Joined: 26 Nov 2006
Posts: 404

PostPosted: Sun Dec 14, 2008 11:06 pm    Post subject: Reply with quote

to make a string lowercase, you would want... umm.

Code:

dim lol as string = "mEOW"
lol = lol.ToLower
or
lol = LCase(lol)

i think that's what you want.

for number two, add a keypress event and do
dim check as integer
asc(e.keychar)
if check = 100 then
bla
else
e.handled = true
end if

i guess.

_________________
Back to top
View user's profile Send private message AIM Address
I'm C.H.
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Dec 2006
Posts: 1000
Location: Sweden

PostPosted: Mon Dec 15, 2008 12:27 am    Post subject: Reply with quote

Okay, for number one I need an example on it's usage of the words Low, Medium, High and Best.

For the second one, Haven't tested yet but I dunno how it could make M: and L: separate eachother. I also need an example there :/

_________________
Omg. I need something to do...

*-* My Flash Trainers *-*

*-* My Mouse Vac Tut *-*

Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Mon Dec 15, 2008 2:10 pm    Post subject: Reply with quote

CheatingHacker wrote:
Okay, for number one I need an example on it's usage of the words Low, Medium, High and Best.

For the second one, Haven't tested yet but I dunno how it could make M: and L: separate eachother. I also need an example there :/


String.Compare(TextBox1.Text, "Low", True);

would do a case independent comparison of the word 'Low'.

low, LoW lOw, whatever will return a match.

http://msdn.microsoft.com/en-us/library/zkcaxw5y.aspx
Back to top
View user's profile Send private message
hacksign23
Master Cheater
Reputation: 0

Joined: 26 Nov 2006
Posts: 404

PostPosted: Mon Dec 15, 2008 7:50 pm    Post subject: Reply with quote

or...
if TextBox1.Text <> "low" then
MsgBox("ERRORZ!")
exit sub
end if

_________________
Back to top
View user's profile Send private message AIM Address
I'm C.H.
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Dec 2006
Posts: 1000
Location: Sweden

PostPosted: Tue Dec 16, 2008 5:21 am    Post subject: Reply with quote

slovach wrote:
CheatingHacker wrote:
Okay, for number one I need an example on it's usage of the words Low, Medium, High and Best.

For the second one, Haven't tested yet but I dunno how it could make M: and L: separate eachother. I also need an example there :/


String.Compare(TextBox1.Text, "Low", True);

would do a case independent comparison of the word 'Low'.

low, LoW lOw, whatever will return a match.

http://msdn.microsoft.com/en-us/library/zkcaxw5y.aspx


Okay, Thx but how do I make so that an error message gets displayed if any other words or numbers are used?

_________________
Omg. I need something to do...

*-* My Flash Trainers *-*

*-* My Mouse Vac Tut *-*

Back to top
View user's profile Send private message
Wintermoot
Expert Cheater
Reputation: 0

Joined: 08 Nov 2007
Posts: 198

PostPosted: Tue Dec 16, 2008 5:34 am    Post subject: Reply with quote

According to a quick glance over MSDN, it goes like:
Code:

if String.Compare(TextBox1.Text, "Low", True) = 0 then
//It's true
Back to top
View user's profile Send private message
I'm C.H.
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Dec 2006
Posts: 1000
Location: Sweden

PostPosted: Tue Dec 16, 2008 11:02 am    Post subject: Reply with quote

Worked! Thx ^^
[SOLVED]

_________________
Omg. I need something to do...

*-* My Flash Trainers *-*

*-* My Mouse Vac Tut *-*

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