TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
wsdfg
NA
27
0
parallel port event handler?
Mar 14 2010 2:37 PM
I was able to salvage an ldr sensor from somewhere and now I'm playing around with it. was able to attach it to the parallel port along with an led so I can practice both input and ouput.
I was able to build a small program where if the ldr gets tripped the led will turn on
private void button1_Click(object sender, EventArgs e)
{
do
{
x= PortAccess.Input(889);
if(x==127)
PortAccess.Output(888,1);
if(x==111)
PortAccess.Output(888,0);
}while(x!=127)
}
I had to end it when it gets tripped otherwise its going to be an infinite loop. Now, what if I wanted to have it running the entire time the form is open, without having to press a button, and while other stuff are going on. what should I do?
I thought maybe I can make an event listener and handler for it, but how? or do I even need one and there is a simpler solution? Any ideas? thanks in advance
Reply
Answers (
5
)
Datagridview delete
Linking a text file to the help menu click event