473,320 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Windows Service with com port

Hello All,
I need to write VB.NET application as Windows Service with the following
functions: - the Windows Service shall be able to scan and receive data via
serial port - the received data from serial port to be saved in the text
files.
Is anybody can advice the proper way to do it?

Thank you

VK
Nov 21 '05 #1
4 2892
Hi VK
Check these links
http://support.microsoft.com/default...79&Product=vb6
http://www.codeworks.it/net/VBNetRs232.htm
Mohamed M .Mahfouz
Developer Support Engineer
ITWorx on behalf of Microsoft EMEA GTSC

Nov 21 '05 #2
Thanks fot the reply Mohamed.
Now I understand how to read the serial port, but how can I make windows
service constantly check the port. Does .NET have something like MSComm
control with OnComm event?

Thanks

"Mohamoss" wrote:
Hi VK
Check these links
http://support.microsoft.com/default...79&Product=vb6
http://www.codeworks.it/net/VBNetRs232.htm
Mohamed M .Mahfouz
Developer Support Engineer
ITWorx on behalf of Microsoft EMEA GTSC

Nov 21 '05 #3
Hi,

Does .NET have something like MSComm
control with OnComm event?
<<

The simple class that was referred to in the previous reply does not have
any event notification. You can poll it using a System Timer (easiest is
the System Timer control in the toolbox).

Or, you can use a more complete class, like the Sax Community Edition serial
control that is included in the VB .NET Resource Kit (download from
Microsoft). This one is free, and it does provide OnComm events similar to
those of MSComm.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.
Nov 21 '05 #4
Richard,
I checked out your web site and found NETCommOCX.ocx. Does it have OnComm
event?

"Dick Grier" wrote:
Hi,

Does .NET have something like MSComm
control with OnComm event?
<<

The simple class that was referred to in the previous reply does not have
any event notification. You can poll it using a System Timer (easiest is
the System Timer control in the toolbox).

Or, you can use a more complete class, like the Sax Community Edition serial
control that is included in the VB .NET Resource Kit (download from
Microsoft). This one is free, and it does provide OnComm events similar to
those of MSComm.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Johann Blake | last post by:
I'm developing an application in C# that needs to run as a Windows service. I'm looking for an Internet Service Provider (ISP) to host my application. Since I'm on a shoe-string budget, I can only...
7
by: Will | last post by:
I'm working on a C# Windows Service that needs to monitor serial port communication. Because the .Net framework does not include support for serial communications, I've decided to use the...
2
by: karl | last post by:
I have a windows service that kicks off a 'monitor' thread which in turn kicks off 4 additional threads. These 4 threads basically are listen on a designated socket and report back any errors...
4
by: Kris | last post by:
I have a Windows Service in C# talking to a serial port and using Remoting. It also uses several COM objects. On customer's computer the service will occassionally hang somewhere - the service...
0
by: Jason T | last post by:
I've downloaded and installed the '101 Visual Basic and C# Code Samples' from http://www.microsoft.com/downloads/details.aspx?familyid=08e3d5f8-033d-420b-a3b1-3074505c03f3&displaylang=en I have...
3
by: Mr Utkal Ranjan Pradhan | last post by:
Hi Friends I want to develop a windows service application, which will open a port on the machine and constantly it will listen from that port. And when any data comes to that port I want to...
11
by: kshetgar | last post by:
I am experiencing a wierd problem... I have a C#.Net application Server which uses Sockets. It listens on port 11000. and it runs as a Windows Service. If I run it as a consple Application,...
0
by: Kumar Shetgar | last post by:
I am experiencing a wierd problem... I have a C#.Net application Server which uses Sockets. It listens on port 11000. and it runs as a Windows Service. -- If I run it as a consple...
2
by: Sourcerer | last post by:
I posted these on another group, but was redirected here, so here are my two posts and my questions: Post #1: I've started my first practice windows service project in C#, and I'm already...
3
by: =?Utf-8?B?RGlvZ28gQWx2ZXMgLSBTb2Z0d2FyZSBEZXZlbG9w | last post by:
Greetings, I would like to create a windows service that would expect an event from my software to import data from a device and/or to import data in scheduled times My questions are: - How...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.