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:
here is the code that is ran when a user hits the 0 keyCode: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
i am new to programing any help is apprecated. if you need more information please let me know, thanks!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




Reply With Quote