16,023,339 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by anshumandas (Top 2 by date)
anshumandas
13-Jun-16 23:29pm
View
I am also using this code but the delegate is not reading the card and not showing any data in the text box.I am using the following configuration:
Port No : Com3
Baud Rate: 9600
Parity None
Data Bit 8
Stop bit 1
Environment C#/ASP.net 4.5
USB port
Code
private void Form1_Load(object sender, EventArgs e)
{
RFID = new SerialPort();
RFID.PortName = "COM3";
RFID.BaudRate = 9600;
RFID.DataBits = 8;
RFID.Parity = Parity.None;
RFID.StopBits = StopBits.One;
RFID.Open();
RFID.ReadTimeout = 2000;
if (RFID.IsOpen)
{
DispString = "";
txtAccessCardNo.Text = "";
}
else
{
RFID.Close();
}
RFID.DataReceived += new SerialDataReceivedEventHandler(RFID_DataReceived);
}
private void RFID_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
if (txtAccessCardNo.Text.Length >= 12)
{
RFID.Close();
}
else
{
DispString = RFID.ReadExisting();
this.Invoke(new EventHandler(DisplayText));
}
}
private void DisplayText(object sender, EventArgs e)
{
txtAccessCardNo.AppendText(DispString);
}
Please help me Thanks in advance...
anshumandas
13-Jun-16 23:15pm
View
Deleted
I am also using this code but the delegate is not reading the card and not showing any data in the text box.I am using the following configuration:
Port No : Com3
Baud Rate: 9600
Parity None
Data Bit 8
Stop bit 1
Environment C#/ASP.net 4.5
Code
private void Form1_Load(object sender, EventArgs e)
{
RFID = new SerialPort();
RFID.PortName = "COM3";
RFID.BaudRate = 9600;
RFID.DataBits = 8;
RFID.Parity = Parity.None;
RFID.StopBits = StopBits.One;
RFID.Open();
RFID.ReadTimeout = 2000;
if (RFID.IsOpen)
{
DispString = "";
txtAccessCardNo.Text = "";
}
else
{
RFID.Close();
}
RFID.DataReceived += new SerialDataReceivedEventHandler(RFID_DataReceived);
}
private void RFID_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
if (txtAccessCardNo.Text.Length >= 12)
{
RFID.Close();
}
else
{
DispString = RFID.ReadExisting();
this.Invoke(new EventHandler(DisplayText));
}
}
private void DisplayText(object sender, EventArgs e)
{
txtAccessCardNo.AppendText(DispString);
}
Please help me Thanks in advance...