Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I need help making a calculator like a windows calculator
#1
I want to create a calculator that has many functions but i cant figure out?
#2
Well, making a basic calculator is pretty easy! You just need several buttons and a textbox! You also need variables to keep track of the currently typed number and the number to perform the operation on! I have never made a calculator, but I know some of our members have. Maybe they can chime in and give you some tips!
My Blog | My Setup | My Videos | Have a wonderful day.
#3
Maybe these tutorials will help you.

To make the main calculator:
http://www.youtube.com/watch?v=FWzUbobxz...re=related

To make a temperature converter:
http://www.youtube.com/watch?v=0QaSo5_vXXc

To make a time calculator:
http://answers.yahoo.com/question/index?...952AAGSG7c

Sorry, I didn't find more tutorials.
#4
thanks it helped heres my final result i will post the app in the other section

note: this is basic and does not have advanced buttons



Public Class Form1
Public value1 As Double
Public oper As Char

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
showvalue(Button1)
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
showvalue(Button2)
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
showvalue(Button3)
End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
showvalue(Button6)
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
showvalue(Button5)
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
showvalue(Button4)
End Sub

Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
showvalue(Button9)
End Sub

Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
showvalue(Button8)
End Sub

Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
showvalue(Button7)
End Sub

Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
showvalue(Button11)
End Sub

Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click
arithematic(Button16)
End Sub

Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
arithematic(Button15)
End Sub

Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
arithematic(Button14)
End Sub

Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
arithematic(Button13)
End Sub

Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
Calculate()
End Sub

Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
TextBox1.Text = TextBox1.Text & "."
End Sub
End Class


Module Module1
Sub showvalue(ByVal butt As Button)
Form1.TextBox1.Text = Val(Form1.TextBox1.Text & butt.Text)
End Sub
Sub arithematic(ByVal butt As Button)
Form1.value1 = Val(Form1.TextBox1.Text)
Form1.oper = butt.Text
Form1.TextBox1.Text = ""
End Sub
Sub Calculate()
Select Case Form1.oper
Case "+"
Form1.TextBox1.Text = Form1.value1 + Val(Form1.TextBox1.Text)
Case "x"
Form1.TextBox1.Text = Form1.value1 * Val(Form1.TextBox1.Text)
Case "-"
Form1.TextBox1.Text = Form1.value1 - Val(Form1.TextBox1.Text)
Case "/"
Form1.TextBox1.Text = Form1.value1 / Val(Form1.TextBox1.Text)
End Select
End Sub
End Module
#5
I made a calculator around a year ago, You can make them square root but you need to press alt+251 or something. You can find lots of operators by using the alt+### codes. Just note, it may not be alt but ctrl or something.


Possibly Related Threads…
Thread Author Replies Views Last Post
  help with making a simple program Yevzor 2 14,806 03-29-2013, 05:04 AM
Last Post: Yevzor
  Windows API Code Pack 1.1 brco900033 1 8,715 10-30-2012, 08:12 PM
Last Post: brandonio21
  making a windows login system Bradley 3 13,897 05-29-2012, 04:47 PM
Last Post: brandonio21
  I need help making a webbowser? bryan13roblox 1 8,895 03-24-2012, 01:44 PM
Last Post: xolara
  Calculator Help Vinwarez 7 23,506 03-17-2012, 02:59 PM
Last Post: brandonio21
  i need help on making a launcher with auto updating function jamietjeh 2 12,373 12-16-2011, 07:24 PM
Last Post: xolara

Forum Jump:


Users browsing this thread: 1 Guest(s)