|
|
If it's connected to the Comport, U need not to use Generic drivers, Using SerialPort class you can send your commands, just you have to know the comport settings of your POS.
Print the receipts using the POS driver, Close the Comport(Opened by Driver), Open the comport again using Your Program, send the commands what ever you want.,
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Olá Professores;
Alguém de vocês tem o código de validação do cpf
Atenciosamente
Daniel Raphael
|
|
|
|
|
Google translate says:
Hello Teachers;
Anyone of you have the validation code cpf
Graciously
Daniel Raphael
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Nope........still no clearer!
Dave
Find Me On: Web| Facebook| Twitter| LinkedIn
CPRepWatcher now available as Packaged Chrome Extension, visit my articles for link.
|
|
|
|
|
Que?
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
After running that through Google Translate, your question doesn't make sense.
If you're looking for code to validate soemthing, you're going to have to be a lot more specific (in English) about what you're trying to validate and under what conditions. There is no generic validation code that works with everything in all situations.
|
|
|
|
|
I made a lil' application that tracks wht key has been pressed...
I have called api function... but it's not tracking keys like A or a , R...
It's working for Enter, backspace pretty well.....
Why it is not working for alphabets.....
<br />
Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Keys) As Integer<br />
<br />
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
<br />
<br />
End Sub<br />
<br />
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick<br />
<br />
If GetAsyncKeyState(Keys.A) > 0 Then<br />
<br />
MsgBox("A")<br />
<br />
Else<br />
End If<br />
<br />
<br />
End Sub<br />
End Class
|
|
|
|
|
I don't think that is the way to track the keys being pressed (with a timer?)
Should you not be hooking into the keyboard message loop?
Look at the Docs for it;
GetAsyncKeyState Function
Determines whether a key is up or down at the time the function is called, and whether the key was pressed after a previous call to GetAsyncKeyState.
Your Timer Tick is more than likely missing the keyboard event.
Dave
Find Me On: Web| Facebook| Twitter| LinkedIn
CPRepWatcher now available as Packaged Chrome Extension, visit my articles for link.
|
|
|
|
|
I have put msg box jes to chk if it's working or not....
Ma question is that y this code not working for keys A B C...
It's only working for few keys like enter, Ctrl, Escape.....
|
|
|
|
|
It doesn't work because the key goes through make/break before your Timer fires. Your timer has to fire between the key make and key break message, which will happen VERY quickly.
Seriously, this is a very bad way of see which keys were hit.
A better method would be a keyboard hook.
|
|
|
|
|
Yeah i kno Timer concept is not rite.....but ma focus was on keys 'A','B'....y it's not working for them..
rather works totally fine for enter....
Here some changes i made
<br />
Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress<br />
<br />
If GetAsyncKeyState(Keys.Enter) > 0 Then<br />
<br />
MsgBox("Enter")<br />
<br />
Else<br />
End If<br />
<br />
End Sub
Even this is not working although it's done on Key press event....
|
|
|
|
|
Hi
In the code below It will create a metafile in c:\test\myfile.emf
It should be a image size of 5cm * 5cm
With a vertical line inside of 2cm.
No problem, if I view this in MS word
But in ms paint its all wrong and way to large.
So if I change the line
Dim gr As Graphics = ps.CreateMeasurementGraphics()
to
Dim gr As Graphics = Me.CreateGraphics()
This time paint is OK and MS Word 2000 is ok,
But MS word 2007 reports the line as 2.69 cm.
So does Adobe Illustrator
If I create the same metafile in Adobe Illustrator its perfect for all programs, so it must be possible in VB I hope
Any thoughts
Thanks
Mark
Dim mf As Metafile
Dim ps As New PrinterSettings()
'Dim gr As Graphics = ps.CreateMeasurementGraphics()
Dim gr As Graphics = Me.CreateGraphics()
gr.PageUnit = System.Drawing.Imaging.MetafileFrameUnit.Millimeter
gr.PageScale = 1
Dim me_hdc As IntPtr = gr.GetHdc
mf = New Metafile("c:\test\myfile.emf", me_hdc, New Rectangle(0, 0, 50.0F, 50.0F), MetafileFrameUnit.Millimeter, EmfType.EmfOnly)
gr.ReleaseHdc(me_hdc)
gr.Dispose()
g = Graphics.FromImage(mf)
g.PageUnit = System.Drawing.Imaging.MetafileFrameUnit.Millimeter
g.PageScale = 1
g.FillRectangle(Brushes.Black, 0.0F, 0.0F, 1.0F, 20.0F)
g.Dispose()
|
|
|
|
|
I am working on this program in VB Studio 2010. It detects the computers on the network and checks if they are being used or free. I can check their presence on the network by using :
Dim pingsender As New Ping
Dim HostName As String
'For x = 1 To 3
For i = 0 To 9
HostName = "CN0809B2-DW061" + i.ToString '+ x.ToString
If pingsender.Send(HostName).Status = IPStatus.Success Then
txtPingResult.Text += String.Format("Reply from: " & HostName & vbCrLf)
Else
txtPingResult.Text += String.Format("No Reply From: " & HostName & vbCrLf)
End If
Me.Refresh()
'Pause for 1 second before pinging again
System.Threading.Thread.Sleep(1000)
'Next
Next
txtPingResult.Text = ""
Any help to go further and check if computer is logged on ? can get user name by using :
Dim name As String = Environment.UserDomainName & " \ " & Environment.UserName
Will i need client/server program or can i do this by some other method ?any advices more then welcome...Thanks <pre></pre>
|
|
|
|
|
You can get the logged on users by executing a WMI query on the remote machine and getting all instances of the Win32_LoggedOnUser[^] class.
You can find examples of WMI and VB.NET here[^].
|
|
|
|
|
It really think depends on how you define 'free'.
The problem there though is that I think Win32_LoggedOnUser returns all logged on users, even system accounts and accounts set up by apps that have services running in the background. I would check on that and see if it aligns with what you want to do.
Do you want to know if:
- There is a user logged on sitting active at the machine right now?
- The user is logged in but walked away and the system is idle?
- There is no user even logged in at all but the machine is on?
Just asking because I was working on something that needed to know these specific states before and I MIGHT be able to find some code for you...
|
|
|
|
|
thanks for your help guys, it is highly appreciated.
@ Ray ... the user is logged on and sitting on the machine. I have to use it for a computer room where there is for example say 4 computers. So just need to show on a screen if the computers are switched on and if on then is they any user on it. Basically if someone is logged on then it will mean the computer is not free to use and if no one logged in then one can jump on it. I can ping all the machines to check if they are online just the next bit I been working on is confusing and need help with it. thanks again guys!
|
|
|
|
|
I have made a trigger in oracle 10g
n now i want to get the value of trigger in my windows form
but me nt getting the value
i wnt the value after i click on save button
Plzz helpp
|
|
|
|
|
"value of trigger" doesn't make any sense. The trigger won't return anything to your query from VB.NET, unless you're executing some stored proc on the database and that proc returns a value.
No, I don't have any examples since I, thankfully, haven't worked on Oracle in about 7 years.
|
|
|
|
|
What does the trigger do? Does it add an automatically generated id to a newly inserted row? Then you should query the current value of the corresponding sequence (which was used in the trigger): SELECT MYSEQUENCE.CURRVAL() FROM DUAL
|
|
|
|
|
Hello.
Help me to uderstand how to extend standard context menu of TextBox control in VB6.
I've got a project with a textbox. The text box has by default a context menu.
So the question is how to append to the context menu my own items?
Any useful advices and methods are welcome
P.S. Search in MSDN, Google, yandex etc. is unsuccessful.
|
|
|
|
|
P$YCH0 wrote: Any useful advices and methods are welcome
Demonstration[^]-code is on the left of that page
I are Troll
|
|
|
|
|
Thank you, but I don NOT need tones of f**kin libraries to show a simple context menu.
Do you realy think its smart solution using timer to monitor a control? LOL
Guys, Is any human solutions exists?
|
|
|
|
|
P$YCH0 wrote: Is any human solutions exists?
Quite possibly; you could do worse than look here[^].
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Thank you
But that's not the goal.
I need to add items in standard menu of a textbox. The textbox exists in my application. My application wrote using VB6.
I don't need to DISABLE context menu! I don't want CREATE my own menu! I don't want to REWRITE my application in .NET or C++ only to realize my wish (at least it's just context menu!)!
I just want to get ('handle to' or 'use system resource' or 'something else') existing menu and modify it!
|
|
|
|