Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with MSComm control
Message
 
 
To
12/06/2001 04:50:50
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00515479
Message ID:
00518486
Views:
17
>How about letting me see a piece of your FWRITE() code that works? Something very subtle is happening here, and I can't see it in 4 different setups.

Here is some of the code, it is very generic (for testing) and is pulled from buttons on my form. Good luck:
**Open the connection
nComm = FOpen( "Com1",2 )

IF nComm = -1
  MESSAGEBOX( "Com1 couldn't be opened for some reason." )
ENDIF


**Put in username
IF FWRITE(nComm, "tjohher" + CHR( 13 ) ) = 0
  MESSAGEBOX( "Couldn't enter username, try again." )
ENDIF


**Put in password
IF FWRITE(nComm, "mypassword" + CHR( 13 ) ) = 0
  MESSAGEBOX( "Couldn't enter password, try again." )
ENDIF


**Hit shift + F16 to hang up
IF FWRITE(nComm, CHR( 1 ) + CHR( 111 ) + CHR( 13 ) ) = 0
  MESSAGEBOX( "Couldn't press Shift+F16, try again." )
ENDIF


**Hit F2 to release record and refresh screen
IF FWRITE(nComm, CHR( 1 ) + CHR( 65 ) + CHR( 13 ) ) = 0
  MESSAGEBOX( "Couldn't press F2, try again." )
ENDIF


**Close the connection
IF NOT FClose( nComm )
  MESSAGEBOX( "Couldn't close Com1, try again." )
ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform