Creating the Subtract button on a calculator

Creating the Subtract button on a calculator

Page 1 of 1

4 Replies - 12361 Views - Last Post: 08 January 2010 - 01:36 AM Rate Topic: -----

#1 danltf  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 07-January 10

Creating the Subtract button on a calculator

Posted 07 January 2010 - 01:35 AM

Hi guys,

I'm completely new to programming and wondered if you could help me. I've designed a simple calculator that can add numbers together but am now trying to create a subtraction button. This seems more complicated, I've searched various forums but am a little confused and wondered if any of you can help or point me in the right direction. Here is the coding I've done for the Add button (cmdPlus):


Private Sub cmdPlus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdPlus.Click

        total1 = total1 + Val(txtDisplay.Text)

        txtDisplay.Clear()

    End Sub



However this won't work for the Subtract button.

Any help or advice would really be appreciated.

Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Creating the Subtract button on a calculator

#2 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 469
  • View blog
  • Posts: 4,280
  • Joined: 25-March 09

Re: Creating the Subtract button on a calculator

Posted 07 January 2010 - 04:24 AM

hello :)

check this tutorial :
http://www.dreaminco...wtopic50628.htm

good luck :)
Was This Post Helpful? 0
  • +
  • -

#3 vb5prgrmr  Icon User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: Creating the Subtract button on a calculator

Posted 07 January 2010 - 07:05 AM

and next time use the .NET forum as this forum is pre .net tech...
Was This Post Helpful? 0
  • +
  • -

#4 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6246
  • View blog
  • Posts: 24,014
  • Joined: 23-August 08

Re: Creating the Subtract button on a calculator

Posted 07 January 2010 - 10:35 AM

Moved to VB.NET
Was This Post Helpful? 0
  • +
  • -

#5 danltf  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 07-January 10

Re: Creating the Subtract button on a calculator

Posted 08 January 2010 - 01:36 AM

View PostJackOfAllTrades, on 7 Jan, 2010 - 09:35 AM, said:

Moved to VB.NET


That's great, many thanks!! :^:

And thanks for moving my thread :)

View PostNoBrain, on 7 Jan, 2010 - 03:24 AM, said:

hello :)

check this tutorial :
http://www.dreaminco...wtopic50628.htm

good luck :)


Brilliant, thanks lots!! :D
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1