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 6 Calculator help

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

Joined: 12 Jul 2008
Posts: 339

PostPosted: Thu Jan 01, 2009 8:13 pm    Post subject: VB 6 Calculator help Reply with quote

Hey, I'm kind of new to VB, and I'm trying to figure out how to work the math. My program is supposed to let the user input to numbers, and then post the sum of them. Instead, it is just putting the numbers together(4+5=45). Here's my code, I hope someone can help me:
Code:

Private Sub Command1_Click()
Dim firstint As String
firstint = Text1.Text
Dim secondint As String
secondint = Text2.Text
Text3.Text = firstint + secondint
End Sub
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Thu Jan 01, 2009 8:25 pm    Post subject: Re: VB 6 Calculator help Reply with quote

kosstr12 wrote:
Hey, I'm kind of new to VB, and I'm trying to figure out how to work the math. My program is supposed to let the user input to numbers, and then post the sum of them. Instead, it is just putting the numbers together(4+5=45). Here's my code, I hope someone can help me:
Code:

Private Sub Command1_Click()
Dim firstint As String
firstint = Text1.Text
Dim secondint As String
secondint = Text2.Text
Text3.Text = firstint + secondint
End Sub


Convert the strings to integers, then add them, and convert the result back to a string.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
kosstr12
Master Cheater
Reputation: -1

Joined: 12 Jul 2008
Posts: 339

PostPosted: Thu Jan 01, 2009 8:31 pm    Post subject: Re: VB 6 Calculator help Reply with quote

samuri25404 wrote:
kosstr12 wrote:
Hey, I'm kind of new to VB, and I'm trying to figure out how to work the math. My program is supposed to let the user input to numbers, and then post the sum of them. Instead, it is just putting the numbers together(4+5=45). Here's my code, I hope someone can help me:
Code:

Private Sub Command1_Click()
Dim firstint As String
firstint = Text1.Text
Dim secondint As String
secondint = Text2.Text
Text3.Text = firstint + secondint
End Sub


Convert the strings to integers, then add them, and convert the result back to a string.


Thanks! It worked Very Happy
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