| View previous topic :: View next topic |
| Author |
Message |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Tue Mar 11, 2008 3:19 pm Post subject: pls help me.. VB6 |
|
|
why no one helps me?..
i want to make high quality trainers but i learned VB a weak ago in english (im german) and mainly with a tutorial (not interactive) and everytime i asking for help i just get ignored
just a simple question:
how do i make VB calculate a number
user types in 200 and VB should multiple it with 18
_________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Tue Mar 11, 2008 3:40 pm Post subject: |
|
|
ah i see but not realy helpfull.. what do i have to do to make VB to convert it into integer?
_________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Mar 11, 2008 3:55 pm Post subject: |
|
|
| 92Garfield wrote: | | ah i see but not realy helpfull.. what do i have to do to make VB to convert it into integer? |
Read the link
|
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Tue Mar 11, 2008 4:09 pm Post subject: |
|
|
ah its a shitty explaination cause of the stupid names for objects but i got it now needed to try very often
-.- its just saing 1 all the time instead of calculating
_________________
Last edited by 92Garfield on Tue Mar 11, 2008 4:17 pm; edited 1 time in total |
|
| Back to top |
|
 |
OSIRIS Grandmaster Cheater
Reputation: 0
Joined: 27 Aug 2006 Posts: 654
|
Posted: Tue Mar 11, 2008 4:14 pm Post subject: |
|
|
In VB6 make a button. Double click it and paste this code.
| Code: |
Dim 200 as integer = 200
Dim multi as integer = 18
Dim answer as integer = 200 * 18
Msgbox(answer)
|
There the message box will give you the answer of 200 x 18. Was this what you werre lookinh for?
|
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Tue Mar 11, 2008 4:20 pm Post subject: |
|
|
i'll test it
he tells me that
dim multi as integer = 18
is wrong, he marks the =
the site is wrong:
| Code: | Private Sub cmdadd_Click()
Dim dvalue1 As Double
Dim dvalue2 As Double
Dim dresult As Double
If DataValidation() = False Then
GoTo Exit_cmdadd_Click
End If
dvalue1 = CDbl(txtvalue1)
dvalue2 = CDbl(Txtvalue2)
dresult = dvalue1 + dvalue2
txtresult = CStr(dresult)
Exit_cmdadd_Click:
End Sub |
i used "Timerflash" instead of "dvalue1"
and "text1" instead of "txtvalue1"
then i put it into a variable
| Code: | Dim Timerflash As Double
Timerflash = CDbl(Text1)
Call Flash.SetVariable("_root.timerr", Timerflash * 18) |
and it dont works
_________________
|
|
| Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Tue Mar 11, 2008 5:59 pm Post subject: |
|
|
(Answer TextBox).Text = Val((TextBox With 200 Name).Text) * 18
For example:
| Code: | | txtAnswer.Text = Val(txt200.Text) * 18 |
That's the basic multiplying formula/code
_________________
|
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Wed Mar 12, 2008 5:59 am Post subject: |
|
|
| Blader wrote: | (Answer TextBox).Text = Val((TextBox With 200 Name).Text) * 18
For example:
| Code: | | txtAnswer.Text = Val(txt200.Text) * 18 |
That's the basic multiplying formula/code |
ty working
i got a different problem now but im able to fix it by myself
lol all tell me i'm making mistakes and blader just tells me a code i could change so that it fits for me
btw i will release a electric man 2 trainer soon
edit: yay problem fixed ( i couldn't calculate and setvariable at once)
_________________
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Wed Mar 12, 2008 2:24 pm Post subject: |
|
|
You can use the convert functions that are built into VB as well to convert a string to another variable type:
| Code: | CBool( )
CInt( )
CLng( ) |
And so on.. there are a lot of 'em just google around and you should find the full list if you need the others.
_________________
- Retired. |
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Wed Mar 12, 2008 4:53 pm Post subject: |
|
|
| Wiccaan wrote: | You can use the convert functions that are built into VB as well to convert a string to another variable type:
| Code: | CBool( )
CInt( )
CLng( ) |
And so on.. there are a lot of 'em just google around and you should find the full list if you need the others. |
dont need bladers answer is easy and works good
_________________
|
|
| Back to top |
|
 |
Estx Expert Cheater
Reputation: 0
Joined: 04 Mar 2008 Posts: 172
|
Posted: Wed Mar 12, 2008 7:59 pm Post subject: |
|
|
You should still try to remember those though, trust me: it will come in handy some time.
Everything you learn, you should try to understand and remember.
If you have any problems, you can always ask the people here at C.E.F (I assume), if not: I can help, I programmed in VB6 for 4 years (amongst other languages) so I have a bit of experience.
|
|
| Back to top |
|
 |
malfunction Grandmaster Cheater Supreme
Reputation: 0
Joined: 30 Jan 2007 Posts: 1015 Location: http://www.behindthecorner.com/
|
Posted: Thu Mar 13, 2008 8:19 am Post subject: |
|
|
For me c++ makes more sence in math stuff than vb6.
_________________
|
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Thu Mar 13, 2008 3:14 pm Post subject: |
|
|
| Estx wrote: | You should still try to remember those though, trust me: it will come in handy some time.
Everything you learn, you should try to understand and remember.
If you have any problems, you can always ask the people here at C.E.F (I assume), if not: I can help, I programmed in VB6 for 4 years (amongst other languages) so I have a bit of experience. |
you are right is labyrynth moderator here? hop not i need help
| Code: | CBool( )
CInt( )
CLng( ) |
what do i need to type in the brackets and how do i multiple it then?
_________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Thu Mar 13, 2008 3:21 pm Post subject: |
|
|
| 92Garfield wrote: | | Estx wrote: | You should still try to remember those though, trust me: it will come in handy some time.
Everything you learn, you should try to understand and remember.
If you have any problems, you can always ask the people here at C.E.F (I assume), if not: I can help, I programmed in VB6 for 4 years (amongst other languages) so I have a bit of experience. |
you are right is labyrynth moderator here? hop not i need help
| Code: | CBool( )
CInt( )
CLng( ) |
what do i need to type in the brackets and how do i multiple it then? |
You might want to take a look at the first response to the topic...
|
|
| Back to top |
|
 |
|