All right man..well i changed the code a bit the NoteNum and bPlayDrum are not needed..
Now it looks like this:
PrivateSub Form1_KeyDown(sender AsObject, e As KeyEventArgs) HandlesMe.KeyDown
Dim SDrum1 AsString = ComboBox2.Text
Dim keyPressed AsString = e.KeyData.ToString
Dim vol = volu.Value
MidiPlayer.Play(New NoteOn(0, GeneralMidiPercussion.AcousticSnare, vol))
i was thinking..do you know which code is needed to create a master pan for sound?
I could insert variou values for the master pan..but well...i do not know what happens if the user presses 2 keys at same time?!! : S
I need to know how to get continuous bill numbers, I have a query which gives Bill numbers Continuously for a month but once the month get ends the bill number will start from one again which is not required it should continue with the last bill numbers which was generated in last month...
The Query is...
stQuery = "SELECT MAX(substring(st_bill_no from 9 for 15)) FROM sc_bill WHERE dt_bill_date BETWEEN '" & _
Format(FirstDayOfMonth, "yyyy-MM-dd") & "' AND '" & _
Format(LastDayOfMonth.AddDays(1), "yyyy-MM-dd") & "'"
Thanks In Advance
Without using a vb timer control, whats the best way to to get a known computer list of on off machines. (the app im making knows host names and ip's) Im just hoping there is a better solution than making my own service that i need to install and run each time the computer boots to communicate with my app.
Whats the best method of doing this? Do i need to make a service for each machine to communicate with my app? Ive been out of the loop for programming since visual studio 6. (10 yrs xp though) Back at it again...
To get a "real time" status, you must have a client on the target machines that checks-in with a central database to give it's status. Obviously, a machine that's off cannot give a status so the client application has to check-in when the user hits Windows Shutdown. It would also check-in with a status of Up when the app starts and possibly even check-in with that status every so often. This gives you a current status and you don't have to wait for a report to be generated.
Pinging every machine on the network will not give you a "real time" status, but the known status the last time the machine was pinged. If you have a small number of machines, this can give you a status of every machine fairly quickly. This status will fall farther and farther behind the larger the number of machines you have to get a status on. This gives the status of all machines but you have to wait for that status to be generated when you want the report.
To prevent this delay, to a point, you would have to have a service running on a server somewhere that just pings the machines all the time and updates the database. This will give a report of the status of the machines the last time it was pinged but you wont have to wait for the report to be generated. Again, even this will fall behind as the number of machines increases.
The problem with pinging machines is that the firewalls on them can be configured to block ICMP packets causing the pings to fail and look like the machine is off.
System.ItDidntWorkException: Something didn't work as expected.
I have a Zebra printer that I need to send a character array to, so that it generates a barcode.
I have text and font maping working, by using a RichTextBox and using the Windows PrintDialog.
To send a barcode, I need to send something like this: "^XA^BY8,0^FT124,209^BON,8,N,0,N,1,^FDBase Material^FS^XZ"
The Printer is on a USB port ("USB002") and does not take the SerialPort.Open() command.
Here is my code, which works for other items on USB if I set the SerialPort.PortName = "COM1", just doesn't work for this printer...I'm out of ideas:
IfMe.SerialPort1.IsOpen() ThenDim buf(Command.Length) AsByteFor i AsInteger = 0To (Command.Length - 1)
buf(0) = Asc(Mid(Command, 1, 1))
Next' send to PrinterMe.SerialPort1.ReadExisting()
Me.SerialPort1.Write(buf, 0, Command.Length())
' wait for responseDim ReturnValue AsInteger = -99999
Dim start_time AsInteger = My.Computer.Clock.TickCount
Do Until (Me.SerialPort1.BytesToRead >= 8Or DemoMode = True)
If My.Computer.Clock.TickCount > start_time + 1000Then
DemoMode = True
MessageBox.Show("Printer Meter Timed Out")
ExitFunctionEndIfLoopDim Results AsString = Me.SerialPort1.ReadExisting()
Dim length = Results.Length()
If length < 8Then
MessageBox.Show("Bad Value Sent To Printer")
ReturnTrueEndIfEndIfCatch ex As Exception
USB-Port and Serial-Port is not the same.
But normally, if you install a Driver on your System, you get an emulated Serial-Port for your USB-Device with which you can access it.
Have you took a look at the System-Configuration of your PC-System if there is such a Driver installed ???
I have taken a look and there is no such driver. I even contacted Zebra to see if I could modify the port name from "USB002" to COM, or even relocate the install, but no-go.
I'll try a different method.
Thank you for the help.