castillolen
Enthusiast
hi sir! bat wala pong lumilitaw saken. please help me din po. nakatapat din sa textbox yung cursor. thanks!
kung Plug & Play yung device mo no need mo na ng port... TextBox lang and KeyPress code yun lang kung ang device mo eh me writer need mo ng frequency at port number... and baud rate kung thesis lang yan so yung RFID nyo eh reader lang no need na ng port
Good day this tutorial demonstrate how to create You do not have permission to view the full content of this post. Log in or register now. (RFID) Tag Card Reader
Lets Start Coding...
First open your visual studio language any version and create new project
Second add the following object to your form
1. One SerialPort
2. One TextBox
3. One ListBox
Setup your SerialPort.
1. BaudRate = 9600
2. DataBit = 8
3. DiscardNull = False
4. DtrEnable = False
5. HandShake = None
6. Parity = None
7. ParityRepalce = 63
8. PortName = check your com port name ether COM1 or Any but make sure your com name is correct
9. ReadBufferSize = 4096
10. RtsEnable = False
11. StopBit = One
12. WriteBufferSize = 2048
Now for the code
Code:Public Class Form1 Dim data as string = nothing Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load System.Windows.Forms.Control.CheckForïllêgâlCrossThreadCalls = False End Sub Private Sub SerialPort1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived data = data + SerialPort1.ReadExisting() ' Need to read existing data to clean all pending data If Len(data) > 16 Then SerialPort1.DtrEnable = False TextBox1.Text = Microsoft.VisualBasic.Mid(data, 2, 12) Dim li As ListBox.ObjectCollection li = ListBox1.Items If Not li.Contains(TextBox1.Text) Then ListBox1.Items.Add(Microsoft.VisualBasic.Mid(data, 2, 12)) Beep() End If Dim delay As DateTimeOffset = Now.AddMilliseconds(1500) Do Application.DoEvents() Loop Until Now > delay data = SerialPort1.ReadExisting() SerialPort1.DiscardInBuffer() data = String.Empty SerialPort1.DtrEnable = True End If End Sub End Class
Now you need an RFID Reader Device and Tag Card, Press F5 and start debugging
make sure the cursor is point into TextBox1... Top your Tag Card to the device and you see the tag card data on list box.
Hope this help happy happy coding...
Credited to ME.
retype. leave windows.form.control. then hit "c" checkforillegalcrossthreadcalls will appearhi, good morning ... I got an error regarding with the
system.windows.forms.control.checkforïllêgâlcrossthreadcalls = false
control it says checkforïllêgâlcrossthreadcalls is not a member... what is wrong with this? help
hi, good morning ... I got an error regarding with the
system.windows.forms.control.checkforïllêgâlcrossthreadcalls = false
control it says checkforïllêgâlcrossthreadcalls is not a member... what is wrong with this? help