Results 1 to 18 of 18

Thread: what am i doing wrong [Solved] [02/03]

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2005
    Location
    Minnesota
    Posts
    46

    Resolved what am i doing wrong [Solved] [02/03]

    hello, i am trying to make a stand alone cashregister program. everything works fine exept when it askes for a tender. it is designed to be used on a touch screen so it has an onscreen keyboard with all the keys. but there is an issue. it is set up so when you hit the 'pay' key on the main form it opens up a new diolog box with the onscreen keyboard. when ever i hit the '0' key it closes the diolog box.

    here is the code for when the pay key is clicked:
    Code:
        Private Sub btnPay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPay.Click
            Dim Pay As New Pay 'diolog with keypad
            Dim responce As MsgBoxResult
    
            Pay.total = total ' transfer the total to the diolog box
            Pay.ShowDialog() 'show the diolog box
            responce = Pay.DialogResult 'if payment compleate
            If responce = MsgBoxResult.OK Then 'if payment is accepted
                till = till + total 'add the order to the till
                clear_transaction() ' start new transaction
            End If
    
    
        End Sub
    here is the code that is ran when a user hits the 0 key
    Code:
       Private Sub btn0_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn0.Click
            amtentered = amtentered & "0" 'add 0 to the end of the tender
            format() ' format it in currency style
        End Sub
    
    Private Sub format()
    'an amount of $12.00 is stored as 1200, the next line of code will put the decmial point in the right place.
            itemamt.Text = FormatCurrency(amtentered / 100)
    
        End Sub
    i am new to programing any help is apprecated. if you need more information please let me know, thanks!
    Last edited by tonyrueb; Jun 26th, 2007 at 02:19 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width