Share Your Source Code or Article

Do you have source code, articles, tutorials, web links, and books to share? You can write your own content here. You can even have your own blog.

Submit now...

Database Programming Made Easy

This tutorial will teach you step by step on how to connect and manipulate database. If you'd like to suggest a tutorial please write a comment at the bottom of this article.

Read more...

Hire Us to Do Your Work

Do you want a customized system? Do you want to setup your own website to do business? Then we are here to help you in your programming needs.

Read more...

Search

Using RFID in VB6
emond's picture
Level: Intermediate
Language:

2230 reads



Im back again this time i will show how to use RFID Reader in VB6

Currently im developing Loadable E-Pass System for a confidential client and i want to share some of of codes regarding RFID and VB6.

These is pretty straight forward i used MSCOMM (serial library in .NET) component in order to read /write buffer connected to PC's serial/usb port.

This is done by using the oncomm() event in order to read all the buffers send by the RFID interface without using the timer control.

Private Sub MSComm1_OnComm()
Dim strinput As String

strinput = MSComm1.Input

Text1.Text = Text1.Text & strinput

strinput = HexIt(strinput)

List1.AddItem strinput

End Sub

Then the data will convert by the function HexIt

for more info please download the sample project

Happy coding

for Design projects, robotics, custom web and windows application,
please visit

www.emondsoft.qapacity.com

or contact me @
09212279363
YM: dark_raditz0825

0
Your rating: None

Download Code




Your Vote!

0
Your rating: None


Note

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note:All files are scanned once-a-day by SourceCodester.com for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.


RUNTIME ERROR '8020'

Private Sub MSComm1_OnComm()
Dim strinput As String

strinput = MSComm1.Input

Text1.Text = Text1.Text & strinput

strinput = MSComm1.Input ===> RUN TIME ERROR 8020 "ERROR READING FROM THE DEVICE..

waaaah!!

emond's picture

hehehe..trick lng, demo lng

hehehe..trick lng, demo lng yan, u can request for the full working project,

wink, wink,

regards,

emond
programmer/analyst-consultant

Motorola XR400 RFID reader

Hi, Sir... I am now doing a RFID based library project using a motorola XR400 RFID reader. The communication between and the reader is using the UTP crossover cable.. The problem I facing now is that how to interface the program written with the reader? I also confuse whether using C++ or visual basic is better? Can sir help?

emond's picture

email me for your

email me for your requirement, hope i can help you,

regards,

emond
programmer/analyst-consultant

Sorry to go off TOPIC

SIR,
I liked your code, thanks it worked for me.
I trying to develop a mobile phone backup system (nokia-phone) application in vb6.0.but i've to detect,send and download data from a usb-connected phone. how can i go about this. pliz help(some source code or tutorials).

Thanks in advance

kimbsan
send to
(student)

help nmn..

ung code ba na binigay mo connected agad un sa rfid device? wla na ibang gagawin?

emond's picture

yup, but change the setting

yup, but change the setting according to your RFID reader,

emond
programmer/analyst-consultant

my RFID reader is plug and attach to USB port

sir , can you tel me, hw do i interface this device with VB.net....so dat after reading the tag it should display tag number on vb form....plz tell d coding part.

thanks

emond's picture

pls email

pls email me

dark_raditz0825@yahoo.com

emond
programmer/analyst-consultant

sir i just want to ask if

sir i just want to ask if your program is applicable to HID readers........

interface between RFID Reader and vb

sir.i want to ask for your help,how to interface between RFID Reader and VB..
i have no idea in this situation.
thank you..

emond's picture

RFID is just like barcode

RFID is just like barcode readers, some are Plug and play and there are some come with drivers.

In my sample program i used RFID from a local distributor and it is unsing the pc serial port. In order to communicate with the reader to VB you need the to add a component (Mscomm control)..

Download the sample code and you can see the logic.

emond
programmer/analyst-consultant

Mscomm control

how can i find Mscomm control?
u mean add component(Mscomm control) in visual basic component?
thanx

emond's picture

yes , press CTRL+T

yes , press CTRL+T

emond
programmer/analyst-consultant

Mscomm control

if there is no MSComm Control in my VB library,how to add to the library?

my RFID is a plug and play using usb port

sir,i tried to use your source code but it compiled an error because the component used is only for the pc serial port..
what component must i use for the usb port?and what are the changes on the source code?thank you in advance sir.

Macoy
marxism_mt@yahoo.com

code

i also have download your RFID code but error occured at form load..
"PortOpen"
why this is happen?

how to interface RFID Reader with visual basic?

sir..i want to ask how about to interface between RFID Reader and visual basic.
how to display at the pc after RFID Reader read the RFID card?
thank you..

emond's picture

if your reader supports

if your reader supports serial supports connectivity then download this sample program.

emond
programmer/analyst-consultant

aslan1968's picture

Time Lock?

sir is it possible to lock the time that im getting from the windows?
kc sir need ko ma lock ung time para di mabgo ung oras pag log in ng employee.. my iba pa po bang way o location san ako makakakuha ng time sa v.b proj. na hndi galing sa windows..xe iinstall ko ung program sa guest lang eh baka baguhin nung administrator ung oras po..tnx sir hope for ur reply..

pwede kumuha via database din

pwede kumuha via database din pero system clock parin ng pc...
or hook mo pagkuha sa time via a remote pc na di maaaccess ng administrator...

sir nagkakaruntime error 5 ung HexIt function

sir bakit ganun? nagkakaruntime error ung HexIt function?
anu pong solution dun?
thanks po...

Thank your sir!

after reinstalling vb6.0..ok na po un code using
e-gizmo rfid reader.Thank you sir

emond's picture

you're always welcome dude.

you're always welcome dude. goodluck to your project ....

emond
programmer/analyst-consultant

error

run-time error '5',
invalid procedure call or argument sir un lumlabas the if i click debug

poin t po d2 sa code na to

HexIt = Mid$(HexIt, 1, Len(HexIt) - 1)

ano kaya kaya problem sir?when the rfid reader is connected ito un error

thanks for your reply

umepinkie's picture

this is out of the subject

do you know how to add checkboxes using visual basic and then save the item to the database? I'm so lost and not sure who to ask

emond's picture

do you have RFID reader?

do you have RFID reader?

emond
programmer/analyst-consultant

error

sir, there is an error

HexIt = Mid$(HexIt, 1, Len(HexIt) - 1)

emond's picture

do u have RFID reader? tnx

do u have RFID reader?

tnx

emond
programmer/analyst-consultant

e-gizmo rfid reader

meron sir,un Hexit function nag eerror if nakaka connect un rfid reader from e-gizmo.tnx

emond's picture

ah okie, RFID from e-gizmo

Public Function HexIt(stext As String) As String

Dim a As Long
For a = 1 To Len(stext)
HexIt = HexIt & Hex$(Asc(Mid(stext, a, 1))) & Space$(1)
On Error Resume Next
DoEvents
Next a
HexIt = Mid$(HexIt, 1, Len(HexIt) - 1)
End Function

emond
programmer/analyst-consultant

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.

Step by Step Java Tutorial

In this tutorial you will learn how to program with Java. It has a rich of information to be educated well with Java.

Read more...

Do You Have Question?

Do you have any question related to computer programming? Visit our forum and post new topic on the category you like. Be gentle when asking a question.

Ask now...

Point of Sale

Point of Sale is very useful especially for supermarkets or restaurants. I have included a barcode scanner in this program. Please check it out.

Read more...