2014-02-10 2 views
0

Windows CE에 구현 된 XP SP3을 통해 MC1000 데이터 수집기가있는 EMDK 2.6이 포함 된 Visual Studio 2005 프로젝트가 있습니다. 내가 Me.TextBox6.Text 서로 다른 길이의 바코드 (예 : 24)를 읽을 때바코드의 길이를 확인하는 동안 오류가 발생했습니다.

'Handle data from the reader 
Private Sub HandleData(ByVal TheReaderData As Symbol.Barcode.ReaderData) 
'MsgBox("Hello I'm reading ....") 
If Me.DataTextBox.Text = "" Then 
    Me.DataTextBox.Text = TheReaderData.Text 
    ' Here begins the verification of the length 
    If Len(Me.DataTextBox.Text) = Me.TextBox6.Text Then 
     ' The length is ok 
     objStreamWriter.WriteLine(Me.DataTextBox.Text) 
     'Update the last read 
     Me.Label5.Text = Me.DataTextBox.Text 
     'Clean the field of the current read 
     Me.DataTextBox.Text = "" 
     'The counter of the code bars reads increases +1 
     Me.TextBox3.Text = Me.TextBox3.Text + 1 
    Else 
     Me.DataTextBox.Text = "" 
     MessageBox.Show("The length of the string read is not as expected", "Error !") 
    End If 
End If 
End Sub 

문제는 시작 : 은 내가 해결할 수없는 나에게 오류를 제공 프로젝트 내에서이 기능이 메시지 상자에는 ok가 표시되지만 다음 메시지와 함께 다른 메시지 상자가 나타납니다. "StartRead Invalid Request Read already pending" 이 프로그램이 계속 잘 수행되므로이 ​​오류를 제거해야합니다. 도움이 되었습니까? 미리 감사드립니다.

답변

0

MessageBox는 응용 프로그램이 다른 이벤트를 처리하는 것을 중지하지 않으며 이전 이벤트를 처리하는 기능을 사용하는 동안 새 바코드가 읽히거나 바코드가 다시 통보 될 수 있습니다. MessageBox에 대한 호출을 제거하고 이것이 여전히 발생하는지 확인하려고 했습니까? MessageBox를 호출하기 전에 판독기를 비활성화해야 할 수 있습니다.

+0

감사합니다. – Alf

관련 문제