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 


HELP: HELP ME FAST

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

Joined: 12 Dec 2007
Posts: 44

PostPosted: Thu Mar 20, 2008 2:06 am    Post subject: HELP: HELP ME FAST Reply with quote

Hi, i am coding a program, and i want a function thta if u translate some word right and click a button Form2 opens.
I know this code:

If txtWashington.Text = "George Washington" Then
frmGeorgeBush.Show
End If

But i want that if you type wrong thing in txtWashington.Text you gets a txtbox saying NOPE.

"
If txtWashington.Text = "George Washington" Then
frmGeorgeBush.Show

If Not TextBox "NOPE"
End If
"
Something like that, please whats the code?
Back to top
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Thu Mar 20, 2008 2:11 am    Post subject: Reply with quote

uhhh... i'd try and help you, but what language are you talking about?
_________________
Back to top
View user's profile Send private message
SwedenS
Cheater
Reputation: 0

Joined: 12 Dec 2007
Posts: 44

PostPosted: Thu Mar 20, 2008 2:13 am    Post subject: Reply with quote

Im talking about Visual Basic, isnt that visible enogh.!
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Thu Mar 20, 2008 2:41 am    Post subject: Reply with quote

Code:
If txtWashington.text = "George Washington" then
frmGeorgeBush.Show
else
MsgBox("Something")
end if

There's probably errors, having been doing VB for a while.
Back to top
View user's profile Send private message
SwedenS
Cheater
Reputation: 0

Joined: 12 Dec 2007
Posts: 44

PostPosted: Thu Mar 20, 2008 3:58 am    Post subject: Reply with quote

Thank you moller, testing it in school after the weekend and the easter.

Keep giving me samples of it.
Back to top
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Thu Mar 20, 2008 5:00 am    Post subject: Reply with quote

im fairly sure moller got it perfect, btw, what kind of program is this going to be for?
_________________
Back to top
View user's profile Send private message
Estx
Expert Cheater
Reputation: 0

Joined: 04 Mar 2008
Posts: 172

PostPosted: Thu Mar 20, 2008 6:04 am    Post subject: Reply with quote

Moller's code is good.
Here's a couple of more complex ways to do this:

Using a select statement
Code:

Select Case txtWashington.Text
    Case "George Washington":
        frmGeorgeBush.Show
    Case "King Kong":
        frmKingKong.Show
    Case Else:
        MsgBox "You fail at life."
End Select


Using multiple IF statements
Code:
    If txtWashington.Text = "George Washington" Then
        frmGeorgeBush.Show
    ElseIf txtWashington.Text = "Sonic" Then
        frmSonic.Show
    ElseIf txtWashington.Text = "Moo" Then
        MsgBox "cow"
    Else
        MsgBox "Fail"
    End If


They could be helpful for future reference.
Back to top
View user's profile Send private message
SwedenS
Cheater
Reputation: 0

Joined: 12 Dec 2007
Posts: 44

PostPosted: Thu Mar 20, 2008 6:29 am    Post subject: Reply with quote

Estx wrote:
Moller's code is good.
Here's a couple of more complex ways to do this:

Using a select statement
Code:

Select Case txtWashington.Text
    Case "George Washington":
        frmGeorgeBush.Show
    Case "King Kong":
        frmKingKong.Show
    Case Else:
        MsgBox "You fail at life."
End Select


Using multiple IF statements
Code:
    If txtWashington.Text = "George Washington" Then
        frmGeorgeBush.Show
    ElseIf txtWashington.Text = "Sonic" Then
        frmSonic.Show
    ElseIf txtWashington.Text = "Moo" Then
        MsgBox "cow"
    Else
        MsgBox "Fail"
    End If


They could be helpful for future reference.


Thx, and i place the code in Command1 button? (Double click the button.)
Back to top
View user's profile Send private message
Estx
Expert Cheater
Reputation: 0

Joined: 04 Mar 2008
Posts: 172

PostPosted: Thu Mar 20, 2008 8:09 am    Post subject: Reply with quote

Yeah, inside any sub/function will work.

Just make sure you edit the code appropriately where needed.
Back to top
View user's profile Send private message
SwedenS
Cheater
Reputation: 0

Joined: 12 Dec 2007
Posts: 44

PostPosted: Sat Mar 22, 2008 4:45 am    Post subject: Reply with quote

THX, again, keep giving me samples of login..

Now, i need a login & register code/tutorial.
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