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 


[Visual C# 2005]Help with indicating multiplication - SOLVED

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

Joined: 14 Jan 2007
Posts: 88

PostPosted: Tue Aug 28, 2007 2:36 pm    Post subject: [Visual C# 2005]Help with indicating multiplication - SOLVED Reply with quote

i am building an auto typer in C# and im still getting used to C# its a bit different from VB and i was getting used to C# by making some programs i have made in VB and i ran into the problem of telling C# that i wanted to multiply by 1000 using the code "* 1000" but it is telling me i cannot use "*" so what i am asking is for some assistance in finishing my project

the code i am using is

Code:
         private void button1_Click(object sender, EventArgs e)
        {
            timer1.Interval = textBox1.Text * 1000;
        timer1.Enabled = true;
        }


the problem is the "*", if someone could help me fix it that would be great.


Last edited by TheIndianGuy on Tue Aug 28, 2007 2:49 pm; edited 3 times in total
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Tue Aug 28, 2007 2:41 pm    Post subject: Re: [Visual C# 2005] Help with indicating multiplication Reply with quote

skate4lifee wrote:
i am building an auto typer in C# and im still getting used to C# its a bit different from VB and i was getting used to C# by making some programs i have made in VB and i ran into the problem of telling C# that i wanted to multiply by 1000 using the code "* 1000" but it is telling me i cannot use "*" so what i am asking is for some assistance in finishing my project

the code i am using is

Code:
         private void button1_Click(object sender, EventArgs e)
        {
            timer1.Interval = textBox1.Text * 1000;
        timer1.Enabled = true;
        }


the problem is the "*", if someone could help me fix it that would be great.


Try

timer1.Interval = timer1.Interval + Convert.ToInt32(textBox1.Text) * 1000
Back to top
View user's profile Send private message
TheIndianGuy
Advanced Cheater
Reputation: 102

Joined: 14 Jan 2007
Posts: 88

PostPosted: Tue Aug 28, 2007 2:46 pm    Post subject: Reply with quote

thank you it works great
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: Tue Aug 28, 2007 5:03 pm    Post subject: Reply with quote

A simpler way to do this is:

Code:

         private void button1_Click(object sender, EventArgs e)
        {
            timer1.Interval = int.Parse(textBox1.Text) * 1000;
            timer1.Enabled = true;
        }


This parses the text in textBox1, and sticks it into an int value.
Back to top
View user's profile Send private message
TheIndianGuy
Advanced Cheater
Reputation: 102

Joined: 14 Jan 2007
Posts: 88

PostPosted: Tue Aug 28, 2007 8:51 pm    Post subject: Reply with quote

samuri25404 wrote:
A simpler way to do this is:

Code:

         private void button1_Click(object sender, EventArgs e)
        {
            timer1.Interval = int.Parse(textBox1.Text) * 1000;
            timer1.Enabled = true;
        }


This parses the text in textBox1, and sticks it into an int value.


thanks, yeah i agree that is much easier, thats what i wanted to do (stick it into an int value =P)
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