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 


vb6 numbers

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

Joined: 29 Aug 2007
Posts: 905

PostPosted: Sat Nov 17, 2007 9:29 am    Post subject: vb6 numbers Reply with quote

ok like when i click the "click" button in text1 it increase by 1? i been trying to do it and finally gonna ask how
Back to top
View user's profile Send private message
Blader
I post too much
Reputation: 2

Joined: 19 Jan 2007
Posts: 2049

PostPosted: Sat Nov 17, 2007 9:37 am    Post subject: Reply with quote

It's something like this

Code:
text1.Text = text1.Text + 1


or

Code:
text = Val(text1.Text) + 1

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

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Sat Nov 17, 2007 9:40 am    Post subject: Reply with quote

I think youre thinking of a label?
I would do it like this
Declare this variable:
Code:
Dim intNumber as Integer

On form_load:
Code:
intNumber = 1


And then make a button, label and timer
On timer:
Code:
Label1.Caption = intNumber

Make interval around 100

On button code:
Code:
IntNumber = IntNumber + 1
Back to top
View user's profile Send private message
Golden Wing
Grandmaster Cheater
Reputation: 0

Joined: 29 Aug 2007
Posts: 905

PostPosted: Sat Nov 17, 2007 9:41 am    Post subject: Reply with quote

Blader wrote:
It's something like this

Code:
text1.Text = text1.Text + 1


or

Code:
text = Val(text1.Text) + 1


dont works none

Edit: thx moller works good
Back to top
View user's profile Send private message
Blader
I post too much
Reputation: 2

Joined: 19 Jan 2007
Posts: 2049

PostPosted: Sat Nov 17, 2007 9:45 am    Post subject: Reply with quote

It works for me
When I click the command button, the text box value goes up by 1
Set up a command button and a textbox, and put the number 1 in the textbox

Add this code to the command
Code:
Private Sub Command1_Click()
If IsNumeric(Text1.Text) Then
Text1.Text = Text1.Text + 1
End If
End Sub


EDIT: Oh I see what you meant, nvm

_________________
Back to top
View user's profile Send private message
Golden Wing
Grandmaster Cheater
Reputation: 0

Joined: 29 Aug 2007
Posts: 905

PostPosted: Sat Nov 17, 2007 9:55 am    Post subject: Reply with quote

Blader wrote:
It works for me
When I click the command button, the text box value goes up by 1
Set up a command button and a textbox, and put the number 1 in the textbox

Add this code to the command
Code:
Private Sub Command1_Click()
If IsNumeric(Text1.Text) Then
Text1.Text = Text1.Text + 1
End If
End Sub


EDIT: Oh I see what you meant, nvm
this works also thx
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sat Nov 17, 2007 1:04 pm    Post subject: Reply with quote

If you are using the number for something other then display, you should always store it in a numeric data type and not just use the text to increase the number. Just a suggestion.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
darkbobert
How do I cheat?
Reputation: 0

Joined: 08 Mar 2007
Posts: 0

PostPosted: Sat Nov 17, 2007 9:59 pm    Post subject: Reply with quote

Code:
text1.text = val(text1.text)+1


but if ur just useing it to display something id use a label box insted

Code:
label1.caption = val(label1.caption)+1
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