Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Richard Clarke
  Where is Richard Clarke?
 Crowcombe
 United Kingdom
 Richard Clarke
 To: Don Higgins
  Where is Don Higgins?
 Peoria
 Illinois - United States
 Don Higgins
 Tags
Subject: RE: mscomm error control
Thread ID: 155297 Message ID: 155389 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Errors & Debugging
Date: Monday, December 31, 2007 3:13:47 PM         
   


> > Don,
> >
> > Sorry my mistake!
> >
> >
> > in the error method on the form check to see if the error number is 1429 or 1426 (OLE errors). You can then use aerror() to get the error number from the control. Element 7 gives you the OLE errror number.
> >
> >
> > Sorry about the earlier error - still in Christmas mode!
> >
> >
> > Regards
> >
> >
> >
> > Richard Clarke
>
>
> Here is what I have now, I think it was from someone on the board that I was able to search on. Weird thing is it bypasses this Error Event and goes VFP Error still.
>
>
> Lparameters nError, cMethod, nLine
> 
> If Inlist(nError, 1429, 1426)
> 	Local aErrArray(1)
> 	Aerror(aErrArray)
> 	If [INVALID PORT NUMBER] $ Upper(aErrArray(3)) Or ;
> 			[UNKNOWN OLE STATUS CODE] $ Upper(aErrArray(3))
> 		glBadPort = .T.
> 	Endif
> Else
> 	Messagebox([Error #: ] + Allt(Str(nError)) + Chr(13) + ;
> 		[Message: ] + Message() + Chr(13) + ;
> 		[Line with error: ] + Allt(Str(nLine)) + Chr(13) + ;
> 		[Method: ] + cMethod)
> Endif
> 
> 

>
>
> Don Higgins
>
>
>
>
>

Don,

I have put your code into the error method on the form that has the mscomm control and it runs fine. I also have a generic on error running, but it always run the code on the form.



Regards



Richard

ENTIRE THREAD

mscomm error control Posted by Don Higgins @ 12/29/2007 9:20:59 AM
RE: mscomm error control Posted by Richard Clarke @ 12/29/2007 7:04:48 PM
RE: mscomm error control Posted by Don Higgins @ 12/29/2007 8:38:57 PM
RE: mscomm error control Posted by Richard Clarke @ 12/29/2007 9:01:39 PM
RE: mscomm error control Posted by Don Higgins @ 12/29/2007 10:09:47 PM
RE: mscomm error control Posted by Richard Clarke @ 12/31/2007 3:13:47 PM