|
-
Mar 17th, 2007, 01:01 PM
#1
Thread Starter
New Member
Taking in values from buttons
[deleted]_________________________________________
Last edited by TwoyTaylor; Mar 30th, 2007 at 08:31 PM.
-
Mar 17th, 2007, 02:07 PM
#2
Frenzied Member
Re: Taking in values from buttons
I am assuming that you are using buttons 1 - 0 (like on a microwave) as the input for the time value. So, code such as:
Text1.Text = Button1.Text & Button2.Text & Button3.Text
Would put 123 into a TextBox named Text1.
One thing you need to consider is that the 123 in Text1 will be a string and you will need to convert it to an integer value to have it work with your timer.
Good Luck
-
Mar 17th, 2007, 02:38 PM
#3
Thread Starter
New Member
Re: Taking in values from buttons
[deleted]______________________________________________
Last edited by TwoyTaylor; Mar 30th, 2007 at 08:31 PM.
-
Mar 17th, 2007, 03:04 PM
#4
Frenzied Member
Re: Taking in values from buttons
It will simply print 1234567890 into the text box when I hit button 1.
Yes, you are correct. I was just showing you how you could get the text value that appeared on your button, into a textbox. You would actually need to add the button value of each button as it is clicked. Something like:
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Text1.Text = Text1.Text & Button1.Text
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Text1.Text = Text1.Text & Button2.Text
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Text1.Text = Text1.Text & Button3.Text
End Sub
There are a lot of ways that you could do your project and, since I don't know much about it, I can't relly state what the best way would be. And, using a textbox to hold the time value might not be the best control to use.
Good Luck
-
Mar 17th, 2007, 05:35 PM
#5
Thread Starter
New Member
Re: Taking in values from buttons
[deleted]______________________________________________
Last edited by TwoyTaylor; Mar 30th, 2007 at 08:32 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|