Use to manage a serial port for a VB6 application...

  • Thread starter Matthew Ryan via .NET 247
  • Start date

Matthew Ryan via .NET 247

I have a fairly large heritage VB 6 application that controlsabout 5 serial port devices with a fairly complicated but lineartimer scheme to service all of them (a work around of the singlethread aspect). I am trying to upgrade incrementally, and wantto write a stand alone class / module / application thatcan service one of these devices on it's own. I'd start thisapplication from the VB6 heritage program and (ideally) serviceinterrupts that come from the new VB.NET application. Thatapplication would be controlling the serial port by itself. Does anyone have suggestions for the best way of implementingthis? (Console, form, service, other?)

Thanks in advance,

Dick Grier

That application would be controlling the serial port by itself. Does
anyone have suggestions for the best way of implementing this? (Console,
form, service, other?)

Personally, I almost always create a Windows Forms client application for
this. In almost all cases, I want to be able to view results (even if only
for debugging and problem solving, where the application normally is
minimized), and for purposes of configuration to meet changing hardware
schemes. So, I'd vote for forms.

A single class for each device makes sense. In that way you can add or
delete hardware without having to change any program structure.

I never use Console applications for this sort of thing.

As to a Service -- well, there are reasons to create a service (then I'd
have the Windows Forms application as a support tool, but it need not run
unless called for). Debugging services are a little more tricky than
standard apps, and you tend to use a lot of logging that might otherwise
simply be displayed. Still, they have their place and shouldn't be rejected
"out of hand."


Richard Grier (Microsoft Visual Basic MVP)

See for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question