johnsraid Posted May 31, 2003 Posted May 31, 2003 Hello May you help me to finish programming the MathCalculator App: Private Sub Digit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bttn1.Click, bttn2.Click, bttn3.Click, bttn4.Click, bttn5.Click, bttn6.Click, bttn7.Click, bttn8.Click, bttn9.Click, bttnZero.Click Thanks Quote
*Experts* mutant Posted May 31, 2003 *Experts* Posted May 31, 2003 Do you have some specific problems with it? I doesnt look like you tried :) Quote
johnsraid Posted May 31, 2003 Author Posted May 31, 2003 What code to add to obtain corresponding digit displayed when I press a digit button? So how to append the digit clicked to the calculator's display? Thks Quote
*Experts* mutant Posted May 31, 2003 *Experts* Posted May 31, 2003 Lets say your calulator display is a textbox, and that the buttons will contain only the number you want to use when they are clicked. Private Sub Digit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bttn1.Click, bttn2.Click, bttn3.Click, bttn4.Click, bttn5.Click, bttn6.Click, bttn7.Click, bttn8.Click, bttn9.Click, bttnZero.Click if sender is bttn1 then textbox1.appendText(bttn1.text) elseif sender is bttn2 then textbox1.appendText(bttn2.text) elseif 'repeat this for every button end if Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.