The Artima Developer Community
Sponsored Link

Web Services Forum
code for windows calculator using vb.net

26 replies on 2 pages. Most recent reply: Mar 15, 2007 9:31 AM by Jermaine J

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 26 replies on 2 pages [ 1 2 | » ]
jasmine

Posts: 1
Nickname: jasmine
Registered: Oct, 2002

code for windows calculator using vb.net Posted: Oct 17, 2002 11:57 PM
Reply to this message Reply
Advertisement
someone please help me with the code of a windows calculator using vb.net!! email me at carameldelyte21@yahoo.com


Joshua Richards

Posts: 1
Nickname: jdr52080
Registered: Feb, 2003

Re: code for windows calculator using vb.net Posted: Feb 25, 2003 4:28 PM
Reply to this message Reply
Did anyone ever reply to you about this question? I am also very interestd in this code. Please if you have the code to create the windows calculator in vb.net email me the code. Thanks.

jdr52080

John Rogers

Posts: 1
Nickname: jrod12
Registered: Mar, 2003

Re: code for windows calculator using vb.net Posted: Mar 31, 2003 1:58 PM
Reply to this message Reply
Does any have this code???If so email to boesch@budweiser.com

Kamran

Posts: 1
Nickname: maniei
Registered: Apr, 2004

Re: code for windows calculator using vb.net Posted: Apr 20, 2004 12:20 PM
Reply to this message Reply
did anyone send you the code of simple calculator?
please send me if you got it.

nguyen hung

Posts: 1
Nickname: nguyenhung
Registered: Sep, 2004

Re: code for windows calculator using vb.net Posted: Sep 9, 2004 6:10 AM
Reply to this message Reply
please help me !!!!
do you have code for calculator using vb6 ?
please give me.
thanks.
lanhdiabanggia@yahoo.com

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: code for windows calculator using vb.net Posted: Sep 9, 2004 11:37 AM
Reply to this message Reply
This works:

Sub DoMyHomeworkForMe()
Shell("calc")
End Sub


(Wow, that was harder than I thought it would be -- it's been a long, long time since I did any VB code!)

joan smith

Posts: 1
Nickname: enorak
Registered: Nov, 2004

Re: code for windows calculator using vb.net Posted: Nov 24, 2004 2:07 PM
Reply to this message Reply
Help please, I need to write code for a simple calculator in vb.net. Can anyone help me?

Thanks!!

Jerry

Posts: 1
Nickname: jerry173
Registered: Dec, 2004

Re: code for windows calculator using vb.net Posted: Dec 2, 2004 7:08 AM
Reply to this message Reply
> someone please help me with the code of a windows
> calculator using vb.net!! email me at
>honeybear173@yahoo.com

Michael

Posts: 1
Nickname: mikie
Registered: Sep, 2005

Re: code for windows calculator using vb.net Posted: Sep 27, 2005 6:58 AM
Reply to this message Reply
I need a code for a vb.net calculator. The most recent code. Please if anyone has it send it to blinddriver31@yahoo.com thanks

Johhny Doe

Posts: 1
Nickname: cyrus
Registered: Oct, 2005

Re: code for windows calculator using vb.net Posted: Oct 20, 2005 8:40 PM
Reply to this message Reply
I've just finished writing a calculator for my VB.NET assignment in class. It acts just like the Windows calculator. E-mail me for the code or if anyone needs help understanding the Windows calculator code.

-Cyrus

fatima zero

Posts: 5
Nickname: phantomeya
Registered: Oct, 2005

Re: code for windows calculator using vb.net Posted: Oct 24, 2005 6:37 AM
Reply to this message Reply
hello everyone.....i need this code too....so plz if anyone can help me and give me the calculator code...this is my email fatima_zero@hotmail.com

ash cm

Posts: 1
Nickname: aash
Registered: Oct, 2005

Re: code for windows calculator using vb.net Posted: Oct 24, 2005 7:35 AM
Reply to this message Reply
can you please send me the code for the calculator in this addr- aashucm@yahoo.com


> I've just finished writing a calculator for my VB.NET
> assignment in class. It acts just like the Windows
> calculator. E-mail me for the code or if anyone needs help
> understanding the Windows calculator code.
>
> -Cyrus

raj inam

Posts: 1
Nickname: debra
Registered: Nov, 2005

Re: code for windows calculator using vb.net Posted: Nov 2, 2005 11:02 PM
Reply to this message Reply
Cyrus
can you please send me the code for the calculator in this addrress-- drk_2004_family@yahoo.com


> I've just finished writing a calculator for my VB.NET
> assignment in class. It acts just like the Windows
> calculator. E-mail me for the code or if anyone needs help
> understanding the Windows calculator code.
>
> -Cyrus

Patrick Albernaz

Posts: 1
Nickname: y2pat
Registered: Nov, 2005

Re: code for windows calculator using vb.net Posted: Nov 3, 2005 1:04 PM
Reply to this message Reply
Cyrus can you please send me the code for the calculator for vb.net. I have the basics for the calculator down but still have many complications. My address is patrickalbernaz@hotmail.com

fatima zero

Posts: 5
Nickname: phantomeya
Registered: Oct, 2005

Re: code for windows calculator using vb.net Posted: Nov 7, 2005 2:25 PM
Reply to this message Reply
Public Class calculator
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents txtAcceptNumber As System.Windows.Forms.TextBox
Friend WithEvents Button11 As System.Windows.Forms.Button
Friend WithEvents Button14 As System.Windows.Forms.Button
Friend WithEvents Button15 As System.Windows.Forms.Button
Friend WithEvents Button16 As System.Windows.Forms.Button
Friend WithEvents Button22 As System.Windows.Forms.Button
Friend WithEvents Button24 As System.Windows.Forms.Button
Friend WithEvents Button25 As System.Windows.Forms.Button
Friend WithEvents Button26 As System.Windows.Forms.Button
Friend WithEvents Button27 As System.Windows.Forms.Button
Friend WithEvents btn8 As System.Windows.Forms.Button
Friend WithEvents btn9 As System.Windows.Forms.Button
Friend WithEvents btn5 As System.Windows.Forms.Button
Friend WithEvents btn6 As System.Windows.Forms.Button
Friend WithEvents btn2 As System.Windows.Forms.Button
Friend WithEvents btn3 As System.Windows.Forms.Button
Friend WithEvents btn0 As System.Windows.Forms.Button
Friend WithEvents btn7 As System.Windows.Forms.Button
Friend WithEvents btn4 As System.Windows.Forms.Button
Friend WithEvents btn1 As System.Windows.Forms.Button
Friend WithEvents btnpoint As System.Windows.Forms.Button
Friend WithEvents btnplus As System.Windows.Forms.Button
Friend WithEvents btnminus As System.Windows.Forms.Button
Friend WithEvents btndivide As System.Windows.Forms.Button
Friend WithEvents btnMulty As System.Windows.Forms.Button
Friend WithEvents btnequal As System.Windows.Forms.Button
Friend WithEvents btnclear As System.Windows.Forms.Button
Friend WithEvents btnback As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(calculator))
Me.btnequal = New System.Windows.Forms.Button
Me.txtAcceptNumber = New System.Windows.Forms.TextBox
Me.btn8 = New System.Windows.Forms.Button
Me.btn9 = New System.Windows.Forms.Button
Me.btndivide = New System.Windows.Forms.Button
Me.btn5 = New System.Windows.Forms.Button
Me.btn6 = New System.Windows.Forms.Button
Me.btnMulty = New System.Windows.Forms.Button
Me.btn2 = New System.Windows.Forms.Button
Me.btn3 = New System.Windows.Forms.Button
Me.btnminus = New System.Windows.Forms.Button
Me.Button11 = New System.Windows.Forms.Button
Me.btnpoint = New System.Windows.Forms.Button
Me.btnplus = New System.Windows.Forms.Button
Me.Button14 = New System.Windows.Forms.Button
Me.Button15 = New System.Windows.Forms.Button
Me.Button16 = New System.Windows.Forms.Button
Me.btn0 = New System.Windows.Forms.Button
Me.btn7 = New System.Windows.Forms.Button
Me.btn4 = New System.Windows.Forms.Button
Me.btn1 = New System.Windows.Forms.Button
Me.btnback = New System.Windows.Forms.Button
Me.Button22 = New System.Windows.Forms.Button
Me.btnclear = New System.Windows.Forms.Button
Me.Button24 = New System.Windows.Forms.Button
Me.Button25 = New System.Windows.Forms.Button
Me.Button26 = New System.Windows.Forms.Button
Me.Button27 = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'btnequal
'
Me.btnequal.BackColor = System.Drawing.Color.White
Me.btnequal.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btnequal.Location = New System.Drawing.Point(296, 240)
Me.btnequal.Name = "btnequal"
Me.btnequal.Size = New System.Drawing.Size(48, 32)
Me.btnequal.TabIndex = 0
Me.btnequal.Text = "="
'
'txtAcceptNumber
'
Me.txtAcceptNumber.Location = New System.Drawing.Point(8, 32)
Me.txtAcceptNumber.Name = "txtAcceptNumber"
Me.txtAcceptNumber.Size = New System.Drawing.Size(328, 20)
Me.txtAcceptNumber.TabIndex = 1
Me.txtAcceptNumber.Text = ""
'
'btn8
'
Me.btn8.BackColor = System.Drawing.Color.White
Me.btn8.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btn8.Location = New System.Drawing.Point(128, 120)
Me.btn8.Name = "btn8"
Me.btn8.Size = New System.Drawing.Size(48, 32)
Me.btn8.TabIndex = 2
Me.btn8.Text = "8"
'
'btn9
'
Me.btn9.BackColor = System.Drawing.Color.White
Me.btn9.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btn9.Location = New System.Drawing.Point(184, 120)
Me.btn9.Name = "btn9"
Me.btn9.Size = New System.Drawing.Size(48, 32)
Me.btn9.TabIndex = 3
Me.btn9.Text = "9"
'
'btndivide
'
Me.btndivide.BackColor = System.Drawing.Color.White
Me.btndivide.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btndivide.Location = New System.Drawing.Point(240, 120)
Me.btndivide.Name = "btndivide"
Me.btndivide.Size = New System.Drawing.Size(48, 32)
Me.btndivide.TabIndex = 4
Me.btndivide.Text = "/"
'
'btn5
'
Me.btn5.BackColor = System.Drawing.Color.White
Me.btn5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btn5.Location = New System.Drawing.Point(128, 160)
Me.btn5.Name = "btn5"
Me.btn5.Size = New System.Drawing.Size(48, 32)
Me.btn5.TabIndex = 5
Me.btn5.Text = "5"
'
'btn6
'
Me.btn6.BackColor = System.Drawing.Color.White
Me.btn6.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btn6.Location = New System.Drawing.Point(184, 160)
Me.btn6.Name = "btn6"
Me.btn6.Size = New System.Drawing.Size(48, 32)
Me.btn6.TabIndex = 6
Me.btn6.Text = "6"
'
'btnMulty
'
Me.btnMulty.BackColor = System.Drawing.Color.White
Me.btnMulty.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btnMulty.Location = New System.Drawing.Point(240, 160)
Me.btnMulty.Name = "btnMulty"
Me.btnMulty.Size = New System.Drawing.Size(48, 32)
Me.btnMulty.TabIndex = 7
Me.btnMulty.Text = "*"
'
'btn2
'
Me.btn2.BackColor = System.Drawing.Color.White
Me.btn2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btn2.Location = New System.Drawing.Point(128, 200)
Me.btn2.Name = "btn2"
Me.btn2.Size = New System.Drawing.Size(48, 32)
Me.btn2.TabIndex = 8
Me.btn2.Text = "2"
'
'btn3
'
Me.btn3.BackColor = System.Drawing.Color.White
Me.btn3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btn3.Location = New System.Drawing.Point(184, 200)
Me.btn3.Name = "btn3"
Me.btn3.Size = New System.Drawing.Size(48, 32)
Me.btn3.TabIndex = 9
Me.btn3.Text = "3"
'
'btnminus
'
Me.btnminus.BackColor = System.Drawing.Color.White
Me.btnminus.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btnminus.Location = New System.Drawing.Point(240, 200)
Me.btnminus.Name = "btnminus"
Me.btnminus.Size = New System.Drawing.Size(48, 32)
Me.btnminus.TabIndex = 10
Me.btnminus.Text = "-"
'
'Button11
'
Me.Button11.BackColor = System.Drawing.Color.White
Me.Button11.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.Button11.Location = New System.Drawing.Point(128, 240)
Me.Button11.Name = "Button11"
Me.Button11.Size = New System.Drawing.Size(48, 32)
Me.Button11.TabIndex = 11
Me.Button11.Text = "+/-"
'
'btnpoint
'
Me.btnpoint.BackColor = System.Drawing.Color.White
Me.btnpoint.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btnpoint.Location = New System.Drawing.Point(184, 240)
Me.btnpoint.Name = "btnpoint"
Me.btnpoint.Size = New System.Drawing.Size(48, 32)
Me.btnpoint.TabIndex = 12
Me.btnpoint.Text = "."
'
'btnplus
'
Me.btnplus.BackColor = System.Drawing.Color.White
Me.btnplus.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btnplus.Location = New System.Drawing.Point(240, 240)
Me.btnplus.Name = "btnplus"
Me.btnplus.Size = New System.Drawing.Size(48, 32)
Me.btnplus.TabIndex = 13
Me.btnplus.Text = "+"
'
'Button14
'
Me.Button14.BackColor = System.Drawing.Color.White
Me.Button14.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.Button14.Location = New System.Drawing.Point(296, 120)
Me.Button14.Name = "Button14"
Me.Button14.Size = New System.Drawing.Size(48, 32)
Me.Button14.TabIndex = 14
Me.Button14.Text = "sqrt"
'
'Button15
'
Me.Button15.BackColor = System.Drawing.Color.White
Me.Button15.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.Button15.Location = New System.Drawing.Point(296, 160)
Me.Button15.Name = "Button15"
Me.Button15.Size = New System.Drawing.Size(48, 32)
Me.Button15.TabIndex = 15
Me.Button15.Text = "%"
'
'Button16
'
Me.Button16.BackColor = System.Drawing.Color.White
Me.Button16.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.Button16.Location = New System.Drawing.Point(296, 200)
Me.Button16.Name = "Button16"
Me.Button16.Size = New System.Drawing.Size(48, 32)
Me.Button16.TabIndex = 16
Me.Button16.Text = "1/x"
'
'btn0
'
Me.btn0.BackColor = System.Drawing.Color.White
Me.btn0.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btn0.Location = New System.Drawing.Point(72, 240)
Me.btn0.Name = "btn0"
Me.btn0.Size = New System.Drawing.Size(48, 32)
Me.btn0.TabIndex = 17
Me.btn0.Text = "0"
'
'btn7
'
Me.btn7.BackColor = System.Drawing.Color.White
Me.btn7.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btn7.Location = New System.Drawing.Point(72, 120)
Me.btn7.Name = "btn7"
Me.btn7.Size = New System.Drawing.Size(48, 32)
Me.btn7.TabIndex = 18
Me.btn7.Text = "7"
'
'btn4
'
Me.btn4.BackColor = System.Drawing.Color.White
Me.btn4.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btn4.Location = New System.Drawing.Point(72, 160)
Me.btn4.Name = "btn4"
Me.btn4.Size = New System.Drawing.Size(48, 32)
Me.btn4.TabIndex = 19
Me.btn4.Text = "4"
'
'btn1
'
Me.btn1.BackColor = System.Drawing.Color.White
Me.btn1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btn1.Location = New System.Drawing.Point(72, 200)
Me.btn1.Name = "btn1"
Me.btn1.Size = New System.Drawing.Size(48, 32)
Me.btn1.TabIndex = 20
Me.btn1.Text = "1"
'
'btnback
'
Me.btnback.BackColor = System.Drawing.Color.White
Me.btnback.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btnback.Location = New System.Drawing.Point(72, 80)
Me.btnback.Name = "btnback"
Me.btnback.Size = New System.Drawing.Size(80, 24)
Me.btnback.TabIndex = 21
Me.btnback.Text = "backspace"
'
'Button22
'
Me.Button22.BackColor = System.Drawing.Color.White
Me.Button22.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.Button22.Location = New System.Drawing.Point(160, 80)
Me.Button22.Name = "Button22"
Me.Button22.Size = New System.Drawing.Size(80, 24)
Me.Button22.TabIndex = 22
Me.Button22.Text = "CE"
'
'btnclear
'
Me.btnclear.BackColor = System.Drawing.Color.White
Me.btnclear.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btnclear.Location = New System.Drawing.Point(256, 80)
Me.btnclear.Name = "btnclear"
Me.btnclear.Size = New System.Drawing.Size(80, 24)
Me.btnclear.TabIndex = 23
Me.btnclear.Text = "C"
'
'Button24
'
Me.Button24.BackColor = System.Drawing.Color.White
Me.Button24.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.Button24.Location = New System.Drawing.Point(8, 120)
Me.Button24.Name = "Button24"
Me.Button24.Size = New System.Drawing.Size(48, 32)
Me.Button24.TabIndex = 24
Me.Button24.Text = "MC"
'
'Button25
'
Me.Button25.BackColor = System.Drawing.Color.White
Me.Button25.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.Button25.Location = New System.Drawing.Point(8, 160)
Me.Button25.Name = "Button25"
Me.Button25.Size = New System.Drawing.Size(48, 32)
Me.Button25.TabIndex = 25
Me.Button25.Text = "MR"
'
'Button26
'
Me.Button26.BackColor = System.Drawing.Color.White
Me.Button26.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.Button26.Location = New System.Drawing.Point(8, 200)
Me.Button26.Name = "Button26"
Me.Button26.Size = New System.Drawing.Size(48, 32)
Me.Button26.TabIndex = 26
Me.Button26.Text = "MS"
'
'Button27
'
Me.Button27.BackColor = System.Drawing.Color.White
Me.Button27.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.Button27.Location = New System.Drawing.Point(8, 240)
Me.Button27.Name = "Button27"
Me.Button27.Size = New System.Drawing.Size(48, 32)
Me.Button27.TabIndex = 27
Me.Button27.Text = "M+"
'
'calculator
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.PeachPuff
Me.ClientSize = New System.Drawing.Size(352, 286)
Me.Controls.Add(Me.Button27)
Me.Controls.Add(Me.Button26)
Me.Controls.Add(Me.Button25)
Me.Controls.Add(Me.Button24)
Me.Controls.Add(Me.btnclear)
Me.Controls.Add(Me.Button22)
Me.Controls.Add(Me.btnback)
Me.Controls.Add(Me.btn1)
Me.Controls.Add(Me.btn4)
Me.Controls.Add(Me.btn7)
Me.Controls.Add(Me.btn0)
Me.Controls.Add(Me.Button16)
Me.Controls.Add(Me.Button15)
Me.Controls.Add(Me.Button14)
Me.Controls.Add(Me.btnplus)
Me.Controls.Add(Me.btnpoint)
Me.Controls.Add(Me.Button11)
Me.Controls.Add(Me.btnminus)
Me.Controls.Add(Me.btn3)
Me.Controls.Add(Me.btn2)
Me.Controls.Add(Me.btnMulty)
Me.Controls.Add(Me.btn6)
Me.Controls.Add(Me.btn5)
Me.Controls.Add(Me.btndivide)
Me.Controls.Add(Me.btn9)
Me.Controls.Add(Me.btn8)
Me.Controls.Add(Me.txtAcceptNumber)
Me.Controls.Add(Me.btnequal)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "calculator"
Me.Text = "calculator"
Me.ResumeLayout(False)

End Sub

#End Region

Dim zero As Double
Dim one As Double
Dim two As Double
Dim three As Double
Dim four As Double
Dim five As Double
Dim six As Double
Dim seven As Double
Dim eight As Double
Dim nine As Double
Dim plus As Double
Dim save As Double
Dim buttonclick As Double
Dim checked As Double

Private Sub btn0_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn0.Click


If checked = 1 Then
txtAcceptNumber.Text = 0
'checked = 0
Else
Dim read As Double = txtAcceptNumber.Text
txtAcceptNumber.Text = read & 0
End If
End Sub

Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click

If checked = 1 Then
txtAcceptNumber.Text = 1
checked = 0
Else
Dim read As Double = txtAcceptNumber.Text
txtAcceptNumber.Text = read & 1
End If

End Sub

Private Sub btn2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn2.Click

If checked = 1 Then
txtAcceptNumber.Text = 2
checked = 0
Else
Dim read As Double = txtAcceptNumber.Text
txtAcceptNumber.Text = read & 2
End If
End Sub

Private Sub btn3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn3.Click
If checked = 1 Then
txtAcceptNumber.Text = 3
checked = 0
Else
Dim read As Double = txtAcceptNumber.Text
txtAcceptNumber.Text = read & 3
End If
End Sub

Private Sub btn4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn4.Click

If checked = 1 Then
txtAcceptNumber.Text = 4
checked = 0
Else
Dim read As Double = txtAcceptNumber.Text
txtAcceptNumber.Text = read & 4
End If
End Sub

Private Sub btn5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn5.Click
If checked = 1 Then
txtAcceptNumber.Text = 5
checked = 0
Else
Dim read As Double = txtAcceptNumber.Text
txtAcceptNumber.Text = read & 5
End If
End Sub

Private Sub btn6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn6.Click

If checked = 1 Then
txtAcceptNumber.Text = 6
checked = 0
Else
Dim read As Double = txtAcceptNumber.Text
txtAcceptNumber.Text = read & 6
End If
End Sub

Private Sub btn7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn7.Click

If checked = 1 Then
txtAcceptNumber.Text = 7
checked = 0
Else
Dim read As Double = txtAcceptNumber.Text
txtAcceptNumber.Text = read & 7
End If
End Sub

Private Sub btn8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn8.Click

If checked = 1 Then
txtAcceptNumber.Text = 8
checked = 0
Else
Dim read As Double = txtAcceptNumber.Text
txtAcceptNumber.Text = read & 8
End If
End Sub

Private Sub btn9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn9.Click

If checked = 1 Then
txtAcceptNumber.Text = 9
checked = 0
Else
Dim read As Double = txtAcceptNumber.Text
txtAcceptNumber.Text = read & 9
End If
End Sub

Private Sub btnpoint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnpoint.Click
If checked = 1 Then
'Dim d As Double = "."
txtAcceptNumber.Text = "."
checked = 0
Else
Dim read As Double = txtAcceptNumber.Text
'Dim d As Double = "."
txtAcceptNumber.Text = read & "."
End If
End Sub

Private Sub btnplus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnplus.Click
Dim read As Double = txtAcceptNumber.Text
If buttonclick = 89 Then
txtAcceptNumber.Text = save + read
checked = 1
save = txtAcceptNumber.Text
Else
save = txtAcceptNumber.Text
buttonclick = 89
txtAcceptNumber.Text = "0"
End If

End Sub

Private Sub btnminus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnminus.Click
Dim read As Double = txtAcceptNumber.Text
If buttonclick = 1 Then
txtAcceptNumber.Text = save - read
checked = 1
save = txtAcceptNumber.Text
Else
save = txtAcceptNumber.Text
buttonclick = 1
txtAcceptNumber.Text = "0"
End If
End Sub

Private Sub btndivide_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btndivide.Click
Dim read As Double = txtAcceptNumber.Text
If buttonclick = 2 Then
txtAcceptNumber.Text = save / read
checked = 1
save = txtAcceptNumber.Text
Else

save = txtAcceptNumber.Text
buttonclick = 2
txtAcceptNumber.Text = "0"
End If
End Sub

Private Sub btnMulty_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMulty.Click
Dim read As Double = txtAcceptNumber.Text
If buttonclick = 3 Then
txtAcceptNumber.Text = save * read
checked = 1
save = txtAcceptNumber.Text
Else

save = txtAcceptNumber.Text
buttonclick = 3
txtAcceptNumber.Text = "0"
End If
End Sub

Private Sub btnequal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnequal.Click
Dim read As Double = txtAcceptNumber.Text
If buttonclick = 89 Then
txtAcceptNumber.Text = save + read
checked = 1
buttonclick = 0
save = 0
ElseIf buttonclick = 1 Then
txtAcceptNumber.Text = save - read
checked = 1
buttonclick = 0
save = 0
ElseIf buttonclick = 2 Then
txtAcceptNumber.Text = save / read
checked = 1
buttonclick = 0
save = 0
ElseIf buttonclick = 3 Then
txtAcceptNumber.Text = save * read
checked = 1
buttonclick = 0
save = 0
End If

End Sub


Private Sub btnclear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnclear.Click
txtAcceptNumber.Text = 0
save = 0
checked = 0
'buttonclick = 0

End Sub


Private Sub btnback_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnback.Click

If txtAcceptNumber.Text.Length = 1 Then


txtAcceptNumber.Text = 0
Else

Dim value1 As Double = txtAcceptNumber.Text.Length - 1
Dim val As Double = txtAcceptNumber.Text.Remove(value1, 1)
txtAcceptNumber.Text = val
End If

End Sub


End Class

Flat View: This topic has 26 replies on 2 pages [ 1  2 | » ]
Topic: Dekart  File Move Previous Topic   Next Topic Topic: Do I need to extend any of classes from AXIS  to return multiple values?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use