FIX: Setting InBufferCount Property Generates ErrorID: Q187542
|
When you attempt to set the InBufferCount property of the MSCEComm control in Windows CE Toolkit for Visual Basic 5.0 (VBCE), the following error message appears:
450 "Wrong number of arguments or invalid property assignment."
The InBufferCount property is read-only in Windows CE Toolkit for Visual Basic 5.0. The standard Comm control that ships with Visual Basic allows the programmer to set the InBufferCount to zero to empty the input buffer.
To clear the input buffer, simply call the MSCEComm control's Input method, which will read and clear the input buffer as shown in the following code:
Private Sub cmdClearBuffer_Click()
On Error Resume Next
Dim clear
clear = Comm1.Input
If Err.Number <> 0 Then MsgBox Err.Description
End Sub
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Windows CE Toolkit for Visual Basic 6.0.
Private Sub Command1_Click()
On Error Resume Next
Comm1.InBufferCount = 0
If Err.Number <> 0 Then MsgBox Err.Number & _
" " & Err.Description
End Sub
For additional information, please see the following
article in the Microsoft Knowledge Base:
Q185204 HOWTO: Use the Control Manager in CE Toolkit for Visual Basic
Additional query words: wce wince vbce vbce5 vbce6
Keywords : kbToolkit kbVBp500 kbVBp600fix kbWinCE100 kbGrpVB
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: July 13, 1999