I am still working on a POS application in VB.Net 2003. What I need to do is check the state of the cash drawer. I want to make sure the drawer is closed before a cashier is allowed to move on to the next sale. The cash drawer I am using is a MMF ECD200 (not sure if this will make a difference). Here is the code I am using to open the drawer:
I'm trying to convert an ancient cash register program to .net. Conquered everything else, but I can't pop open the cash register. Its connected to COM1, you are supposed to send a "trigger" text down COM1 that will cause the register to open.
Here is the .net code. MsgBox("Opening Drawer") Dim port As System.IO.Ports.SerialPort port = New System.IO.Ports.SerialPort("Com1") port.PortName = "COM1" port.BaudRate = 9600 [Code] .....
I get msgboxes "Signal Sent", "Done Pop Drawer". It just won't pop. It's an MS-Cash Drawer (EP125KC). Definitely connected to COM1, definitely has power. Chr(65) is the old code used to pop drawer and it works: Open drawerComPort For Output Access Write As #1 Print #1, Chr$(65); "A"; Close #1 The above code worked successfully. The root problem was caused by a reversed power cord (negative was on the wrong side).
Prob 1: While the printing is going on, the whole system hangs. I would like the printing to go on while in spooling and not monitor its status.
Prob 2: To solve Prob 1, I removed the try..catch block and all the error messages BUT.. now my cash drawer does not OPEN.
Below is the whole set of code I used for testing. It is really very urgent request. (This code makes the whole system hang till printing is complete)[code]...
Basically, the code checks if the amount being entered is check. If it is check, insert the check value into chckval. If it is cash insert the cash value into cashval. So far, it is half working. It inserts the check into the check fieldname and inserts 0 into cash fieldname. What is not working is inserting cash into cash fieldname if the money is cash. It inserts the cash into cash fieldname as it should but it also inserts the same amount into check fieldname. This is not good. If it is cash and it is inserted into cash fieldname, I want check value to be 0.
Here is the latest code. For x = 1 To 5 Step 1 dedval = Gridview1.FindControl("ded" & CStr(x)) chckval = Gridview1.FindControl("chck" & CStr(x)) chcknumval = Gridview1.FindControl("chcknum" & CStr(x)) checkboxval = Gridview1.FindControl("chckBox" & CStr(x)) [Code] .....
I think there is some issue with the IF chckval.Text <> "" And Not checkboxval.Checked Then statement
I need to know if a form2 is already open when a button1 on form1 is clicked. I found the following code which fails when I open form2 then close form2. When I click button1 on form1 nothing happens. Is there a way to reset form2 to nothing or is this just wrong?
Sub isFormOpen() If xmlTest Is Nothing Then xmlTest.Show() OpenXML(filename) End If End Subdavidbell
I have create a simple app in vb.net that receive data from a bluetooth device ( data are simple strings like "90123.9mm"). Is there a way to check if the device has closed the connection ?
In our VB 2008 we are making a lot of connections to sql server 2005 databases. Is there a possibillity to check with a program or a tool of 2005, all connections are closed?
I am looking to add a sliding drawer effect in a Winforms project.To explain myself further, I am looking to have a tab on the bottom of my form, then when the the tab is clicked the rest of the tab or tab control is shown. Any ways on how to do this or even having a docked tab will work as long as the docks/tabs width does not span across the whole form like all the other examples I have seen.I seen an example of a sliding panel when clicked by a button although I cant find the example anymore.
I still have troubles understanding what the deal is with the whole String.Format("{0:C}" thing. How would I implement it into this code and how exactly does it work?
Public Class Form1 Private Sub computedeposit(byval dblrate As Decimal, ByVal dblfutureval As double, ByVal intyears As integer, byref dbldeposit as double) dblrate = dblrate / 100 dbldeposit = dblfutureval / ((1 + dblrate) ^ intyears)
My assignment this week is to create a simple cash register. The kicker here is that I have to have an input box pop up to accept the data. I know I need to use a Do Loop here, but I' not sure what the proper condition should be. Hitting cancel on the input box or inputting nothing ought to terminate the loop.
Private Sub btnCheckout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCheckout.Click Static decPrice As Decimal Static intCount As Integer Static decSub As Decimal
Im getting mathematical errors. the part that I'm having problems with is, first, it doesn't add the tax to total the correct way. It adds it correctly if I put a dollar(1.00) but when I type one hundred dollars (100.00) it doesn't add the tax correctly. I am trying to compute and display the tax on the new subtotal. Second, it is not adding the correct change to the label in dollars, quarters, dimes, nickels, and cents. Third my arithmatic is not adding correctly when it has to do with the change due back. . Finally, forth I am also trying to do the following:
* add the total for this item to the order sub total and display the new subtotal.
* I have 2 clear buttons, one clears item, the other clears order the clear order button shoule clear out the change due and bordered label and have the subtotal reset to $0.00. The clear item should just clear out the quantity, unit price, and item total textbox.
* When the user has entered the amount of money tendered by the customer and click calc order button, the program should use the amount tendered and the current order total to compute and display the change due to the customer.
* the change due should be displayed in currency format in the readonly label, and should be displayed in terms of the number of dollars and coins due in the bordered label. [code]
I am writing a program that sims a cash register. Everything works fine except VB will not compute subtraction. If I put a replace - with + everything works. What could be the cause of this?
Here is part of the
'Convert input into number isConverted = Double.TryParse(owedTextBox.Text, NumberStyles.Currency, NumberFormatInfo.CurrentInfo, owed)
[CODE]...
***********If owed is 10 and paid is 5, it returns 0, but if I change the - to either a + or *, it returns the expected value
I have this cash register program with separate forms for the items and the display form. The code works untill you press the button 2x. It says 5.5 + 5.5 = 11.5??? Can you fix this code?
CashReg.ListBox1.Items.Add("Item 1") Dim cash As String cash = (5.5)[code]....
I got a big problem in using crystal report in vb.net 2005. im creating a sales and inventory system for softdrinks dealer. so i need to create a receipt for every cash or credit transaction of a client. but i dont have any idea how to use crystal report. how can i make a receipt on crystal report in vb.net 2005.
I am trying to create a socket class in my project to send data to ecr (electronic cash register).Ecr comes with software that listens for commands on port 3535. Command are in forms of XML Files. It has only one catch, I must close the connection on socket, so the ecr would know when to process the command and respond. Since I only send one command at a time,I need the simplest solution I can get.
How it works:I create the socket and connect it to 192.168.1.67:3535 I start
client.BeginReceive
Then I send the command with
client.BeginSend
And I do a
client.Disconnect(True)
so I can get response from ECR.And in 8 of 10 times it works just fine. The problem is this few times it doesn't work.At that time I cant receive anything because it reports that the client is not connected in ReceiveCallback but it still manages to send the data to ECR just fine. The bill comes out on the ECR, but I get no answer about what happened.
I call the class like this:
Dim dre As New HCPSocket Result2 = dre.Otkucaj(Command1, "192.168.1.67") Debug.Print(Result2) dre = Nothing
End the class looks like this:
Imports System Imports System.Net Imports System.Net.Sockets
I need to code this with 20% down payment 2.5% closing costcash required to close the loan Principal and interest can be computed by call the PMT function, terms 30 years (360 months 2.5% Property tax 0.8% insurance monthly payment is equal to the sum of the principal and interest, property tax and insurance.
I have attached my project.
I am not getting any input from my teacher and the book does not say much about this
i am pulling together a cash register that will allow both bar code product entry and manual key entry.imagine if you have a tin of beans in front of you, in a small corner shop they would probably type "47" and then hit "Produce". Fairly straight forward as I have the button Produce to act upon my code and update my salestrans.mdb but,if you scan the bar code I want the same form to handle both 'real' actions, (i assume that keyboard emulation barcode scanner includes "ENTER" after providing 13 digits)....
Q. in perhaps a long winded way i want to know how to kick off an event based on the "ENTER" key being activiated by the barcode scanner)?i do not want to have to hit any buttons if i am scanning bar codes.
I have a laptop with windows 7 and I am trying to make a program for it. I want it to do is after a certain time of day when I close the lid of my laptop it will make it go to sleep. But at every other time of the day I want it to stay awake when I close the lid.
I have been looking all over the internet and i don't understand what people are saying.
If anyone can tell me a way of knowing when my laptops lid is closed in vb.net that would be fantastic.
I am trying to create a locked down browser for the employees at my work to use at a kiosk. I need to prevent the user from getting out of the app. I have figured out how to prevent them from closing it by pressing alt-f4 or ctrl-f4 but I would like to also prevent alt-esc, ctrl-esc, alt-tab, and the windows key. I am new to windows application development but have experience in web vb.net. I am using VB.NET 2010 express.