zer0punk
05-22-2006, 02:37 PM
I am working on a project that requires me to have a onscreen reciept in a windows form. When someone hits the drink button it putts drink and the amount in the text box then if you hit it a secound time it will put another drink and price below it. I want to be able to add those numbers up and put the sum in textbox2 then it add the tax IE .09 and show the taxes in textbox3 and then add the subtotal to the taxes and give me the grand total in textbox4.
Here is the code that I have now:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'HIDING THE TOP MID AND BOTTUM SHELF LIQUIORS
Button5.Visible = False
Button6.Visible = False
Button7.Visible = False
'END OF THE LIQUIOR HIDES
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Button5.Visible = True
Button6.Visible = True
Button7.Visible = True
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Button5.Visible = True
Button6.Visible = True
Button7.Visible = True
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Button5.Visible = False
Button6.Visible = False
Button7.Visible = False
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Button5.Visible = False
Button6.Visible = False
Button7.Visible = False
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Button5.Visible = False
Button6.Visible = False
Button7.Visible = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = TextBox1.Text + vbCrLf + "beer $3.29"
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
End Sub
End Class
Thanks I have been racking my brain and searching I have not found any examples.
K :confused:
Here is the code that I have now:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'HIDING THE TOP MID AND BOTTUM SHELF LIQUIORS
Button5.Visible = False
Button6.Visible = False
Button7.Visible = False
'END OF THE LIQUIOR HIDES
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Button5.Visible = True
Button6.Visible = True
Button7.Visible = True
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Button5.Visible = True
Button6.Visible = True
Button7.Visible = True
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Button5.Visible = False
Button6.Visible = False
Button7.Visible = False
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Button5.Visible = False
Button6.Visible = False
Button7.Visible = False
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Button5.Visible = False
Button6.Visible = False
Button7.Visible = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = TextBox1.Text + vbCrLf + "beer $3.29"
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
End Sub
End Class
Thanks I have been racking my brain and searching I have not found any examples.
K :confused: