Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Aug 21, 1997

Track Modem Use by Other Applications

With applications increasingly using modems, it is quite possible that users will start your application, forgetting that another application is already using the modem-like a fax machine, for example. The MS Comm object that comes with VB has a PortOpen property that returns the state of the modem. However, this property seems to work only when the modem is opened by the VB application in which the command is issued. Otherwise, PortOpen returns False even if, for example, a fax machine is running and is holding the modem port open to monitor incoming faxes. If you try to open the port, it will cause an error message. The only solution is to make an error-handling routine that detects if the port is open by provoking the error and handling it. In the handling routine, insert a MsgBox that tells the user to check for other applications and waits for an answer before resuming.
Eric Bernatchez
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date