Servus und zwar suche ich eine möglichkeit ein VB Programm auf einem Barcodescanner WinCe4.2 (ARMV4T) zumlaufen zu bringen.
Kann mir jemand das übersetzen damit ich das in C++ benutzen kann oder weiß einer ne möglichkeit wie ich das VB Prog auf dem Barcodescanner zum laufen bekomme?
Hir ist der Quellcode
Dim Regal As Boolean
Dim Stock_ID As String
Dim Palettennr As String
Dim Regal_Bereich As String
Dim Ebene As String
Dim Identifier As String
Dim Counter As String
Private Sub Command1_Click()
Regal = True
Command1.Visible = False
Command2.Visible = False
Label5.Caption = ""
Label5.Caption = "Buche Stock ID auf Palette"
Text1.Enabled = True
Text1.Visible = True
Label2.Caption = "Platz"
Text2.Visible = True
Text2.Enabled = False
Text4.Visible = True
Text4.Enabled = False
Label1.Caption = "Paletten Nr."
Label1.Visible = True
Label2.Visible = True
Label4.Visible = True
List1.Clear
List1.Visible = True
List1.Enabled = False
End Sub
Private Sub Command2_Click()
Regal = False
Command1.Visible = False
Command2.Visible = False
Label5.Caption = ""
Label5.Caption = "Buche Stock ID in Regal"
'Text1.Visible = True
Label1.Caption = ""
Label2.Caption = "Regal"
Text2.Visible = True
Text2.Enabled = True
Text3.Visible = True
Text3.Enabled = False
Text4.Visible = True
Text4.Enabled = False
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label4.Visible = True
List1.Clear
List1.Visible = True
List1.Enabled = False
Palettennr = "0"
End Sub
Private Sub Neu_Start()
Command1.Visible = True
Command2.Visible = True
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text1.Visible = False
Text2.Visible = False
Text3.Visible = False
Text4.Visible = False
Label1.Visible = False
Label2.Visible = False
Label3.Visible = False
Label4.Visible = False
List1.Clear
List1.Visible = False
Counter = "6000"
Stock_ID = "0"
Palettennr = "0"
Regal_Bereich = "0"
Ebene = "#"
Form1.Refresh
End Sub
Private Sub Form_Load()
Text1.Visible = False
Text2.Visible = False
Text3.Visible = False
Text4.Visible = False
Label1.Visible = False
Label2.Visible = False
Label3.Visible = False
Label4.Visible = False
List1.Clear
List1.Visible = False
Identifier = "2"
Counter = "6000"
Ebene = "#"
Timer1.Enabled = True
Timer1.Interval = 5
Form1.Caption = "Inventur " + Identifier
End Sub
Private Sub Label5_DblClick()
List1.Enabled = True
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
Dim Antwort As String
'auto_err = False
Dim Palette1 As String
' kleine Zeichen umwandeln
If KeyAscii > 96 And KeyAscii < 123 Then KeyAscii = KeyAscii - 32
' 1 position zurück
If KeyAscii = 8 Then Exit Sub
'if keyascii = 96 then keyascii =
'S/n ist leer oder zu kurz
If KeyAscii = 13 Then
Palette1 = Text1.Text
If Left(Palette1, 1) = "%" And Len(Palette1) > 4 And Len(Palette1) < 7 Then
Palettennr = Mid$(Palette1, 2, Len(Palette1))
Text1.Text = ""
Text1.Text = Palettennr
Palettennr = "%" + Palettennr
Else
Nochmal:
'snd_signal ("alarm8.wav")
Antwort = MsgBox("Paletten Nr. ist falsch, " & vbCrLf & _
"oder mit über Tastatur eingeben", vbOKCancel + vbDefaultButton2)
If Antwort = vbCancel Then
GoTo Nochmal
End If
Text1.Text = ""
Text1.SetFocus
Exit Sub
End If
Text1.Enabled = False
Text2.Enabled = True
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
Dim Antwort As String
Dim Auto_Err As Boolean
Dim Palette1 As String
' kleine Zeichen umwandeln
If KeyAscii > 96 And KeyAscii < 123 Then KeyAscii = KeyAscii - 32
' 1 position zurück
If KeyAscii = 8 Then Exit Sub
If KeyAscii = 13 And Len(Text2.Text) > 0 Then
Palette1 = Text2.Text
If Text2.Text = "END" Then
Text2.Text = ""
Timer1.Enabled = False
Neu_Start
Exit Sub
End If
If Len(Palette1) >= 1 And Len(Palette1) <= 1 Then
Regal_Bereich = Trim$(Palette1)
Else
Nochmal:
'snd_signal ("alarm8.wav")
Antwort = MsgBox("das Regal ist falsch, ", vbOKCancel + vbDefaultButton2)
If Antwort = vbCancel Then
GoTo Nochmal
End If
Text2.Text = ""
Text2.SetFocus
Exit Sub
End If
'SQL abfrage
If Regal Then
Text2.Enabled = False
Text4.Enabled = True
Text4.SetFocus
Else
Text2.Enabled = False
Text3.Enabled = True
Text3.SetFocus
End If
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
Dim Antwort As String
Dim Auto_Err As Boolean
Dim Palette1 As String
Auto_Err = True
' kleine Zeichen umwandeln
If KeyAscii > 96 And KeyAscii < 123 Then KeyAscii = KeyAscii - 32
' 1 position zurück
If KeyAscii = 8 Then Exit Sub
If KeyAscii = 13 And Len(Text3.Text) > 0 Then
Palette1 = Text3.Text
If Text3.Text = "END" Then
Text3.Text = ""
Timer1.Enabled = False
Neu_Start
Exit Sub
End If
If Left(Palette1, 1) >= "A" And Left(Palette1, 1) <= "I" Then
Ebene = UCase(Left(Palette1, 1))
Else
Nochmal:
'snd_signal ("alarm8.wav")
Antwort = MsgBox("die Ebene ist falsch, ", vbOKCancel + vbDefaultButton2)
If Antwort = vbCancel Then
GoTo Nochmal
End If
Text3.Text = ""
Text3.SetFocus
Exit Sub
End If
Text3.Enabled = False
Text4.Enabled = True
Text4.SetFocus
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
Dim Antwort As String
Dim Auto_Err As Boolean
Dim Palette1 As String
List1.Enabled = False
Auto_Err = True
' kleine Zeichen umwandeln
If KeyAscii > 96 And KeyAscii < 123 Then KeyAscii = KeyAscii - 32
' 1 position zurück
If KeyAscii = 8 Then Exit Sub
If KeyAscii = 13 And Len(Text4.Text) > 0 Then
Palette1 = Text4.Text
Text4.Text = ""
If Text4.Text = "$END$" Then
Text4.Text = ""
Text4.SetFocus
Neu_Start
Exit Sub
End If
If Text4.Text = "IGNORE" Then
Text4.Text = ""
Text4.SetFocus
Ignore
Neu_Start
Exit Sub
End If
If Len(Palette1) >= 6 And Len(Palette1) <= 9 Then
'If Check_Stockid(Palette1) = True Then
Stock_ID = Trim(Palette1)
'List1.AddItem Counter
Schreiben
Text4.Text = ""
Text4.SetFocus
'Counter = Counter + 1
Else
Nochmal:
'snd_signal ("alarm8.wav")
Antwort = MsgBox("die StockID ist falsch, " & vbCrLf & _
"oder ist nicht in der SQL-Datenbank", vbOKCancel + vbDefaultButton2)
If Antwort = vbCancel Then
GoTo Nochmal
End If
Exit Sub
End If
End If
End Sub
Private Sub Schreiben()
kanal = FreeFile
Open ("\\servwksp\lager\inventur\" + Stock_ID + ".IV" + Identifier) For Output As #kanal
Print #kanal, Stock_ID
Print #kanal, Palettennr
Print #kanal, Regal_Bereich
Print #kanal, Ebene
Close kanal
End Sub
Private Sub Ignore()
kanal = FreeFile
Open (pfad$ + "IGNORE.IV" + Identifier) For Output As #kanal
Print #kanal, "Statusdatei"
Close kanal
End Sub
Private Sub Timer1_Timer()
File$ = UCase(Dir("\\servwksp\lager\inventur\" + "*.BN" + Identifier))
' dateiname liegt numerisch vor
'Label10.Captin = "Online " + Str(Val(File$))
'wenn keine 'in' datei mehr vorhanden dann exit
If UCase(Right(File$, 4)) = (".BN" + Identifier) Then
kanal = FreeFile
Open ("\\servwksp\lager\inventur\" + File$) For Input As #kanal
Line Input #kanal, Data
Close (kanal)
If Data = "ERROR" Then
Error:
snd_signal ("Boing.wav")
Antwort = MsgBox("die StockID ist nicht vorhanden, " + Stock_ID, vbOKCancel + vbDefaultButton2)
If Antwort = vbCancel Then
GoTo Error
End If
Kill ("\\servwksp\lager\inventur\" + File$)
Text4.SetFocus
'Timer1.Enabled = False
Exit Sub
End If
If Data = "Doppelt" Then
Doppelt:
snd_signal ("Boing.wav")
Antwort = MsgBox("die StockID ist Doppelt, " + Stock_ID, vbOKCancel + vbDefaultButton2)
If Antwort = vbCancel Then
GoTo Doppelt
End If
Kill ("\\servwksp\lager\inventur\" + File$)
Text4.SetFocus
'Timer1.Enabled = False
Exit Sub
End If
Kill ("\\servwksp\lager\inventur\" + File$)
Text4.SetFocus
snd_signal ("REVERSE.WAV")
List1.AddItem Stock_ID
List1.AddItem ""
'Timer1.Enabled = False
End If
End Sub
Seite 1 von 1
Brauche Hilfe Wer Kann Mir Das Von Vb In C++ Übersetzen
Anzeige
Thema verteilen:
Seite 1 von 1

Hilfe
Neues Thema
Antworten

Nach oben

