Récupéré code barre VB6.0 Aide-moi SVP

sportmed Messages postés 194 Date d'inscription mardi 15 mai 2007 Statut Membre Dernière intervention 25 janvier 2014 - 24 mars 2012 à 22:07
sportmed Messages postés 194 Date d'inscription mardi 15 mai 2007 Statut Membre Dernière intervention 25 janvier 2014 - 29 mars 2012 à 13:27
bonjour,

je cherche un code visual basic 6.0, qui permet de lire par le périphérique convenable le code barre, qui se trouve par exemple sur les produits alimentaire, ...

svp. Je vous un code qui permet de récupéré les données d'un article est plus s'affiche dans une texte;

text1.text="6401119876543"

merci bien

car j'ai très besoin à cette solution.

j'ai bien réfléchi, mais j'ai n’arrive pas à réalise ce code

aide_moi SVP, je suis bloqué

45 réponses

sportmed Messages postés 194 Date d'inscription mardi 15 mai 2007 Statut Membre Dernière intervention 25 janvier 2014 2
24 mars 2012 à 22:10
j'ai bien réfléchi, mais j'ai n'arrive pas à réalise ce code

aide_moi SVP, je suis bloqué
0
sportmed Messages postés 194 Date d'inscription mardi 15 mai 2007 Statut Membre Dernière intervention 25 janvier 2014 2
25 mars 2012 à 00:28
Y at-il personne ici me donner un coup de main,
Je ne l'oublierai jamais ce qu'on appelle,
0
sportmed Messages postés 194 Date d'inscription mardi 15 mai 2007 Statut Membre Dernière intervention 25 janvier 2014 2
25 mars 2012 à 01:07
j'ai ce code vb 6 pour récupéré les informations d'un code barre pour un produit;
mais marche pas.

voir.

Private Sub MSComm1_OnComm()
Select Case MSComm1.CommEvent
Case comEvReceive ' Received RThreshold # of chars.
Rxbuff() = MSComm1.Input
Call HandleReceivedData
End Select
End Sub

' ---------------------------------------------------------------------
' called at comms kickoff
Sub InitialiseComms()
frmPlcComms.MSComm1.CommPort = ComPort
frmPlcComms.MSComm1.Settings = "9600,E,7,1"
frmPlcComms.MSComm1.PortOpen = True
frmPlcComms.MSComm1.DTREnable = True
frmPlcComms.MSComm1.RTSEnable = True
frmPlcComms.MSComm1.InputMode = comInputModeBinary
frmPlcComms.MSComm1.InputLen = 0 'Forces entire buffer read
End Sub

0
sportmed Messages postés 194 Date d'inscription mardi 15 mai 2007 Statut Membre Dernière intervention 25 janvier 2014 2
25 mars 2012 à 12:39
bonjour,
en plus j'ai un code vb 6 consiste ce sujet mais marche pas
voir:
Private Sub Command1_Click()
On Error GoTo errHandler

'FOR WRITING
MSComm1.CommPort = 2
MSComm1.Settings = "9600,N,8,1"
MSComm1.PortOpen = True
MSComm1.Output = "Hey its working" 'Text1.Text
MsgBox MSComm1.OutBufferCount
MSComm1.PortOpen = False

'FOR READING

MSComm1.CommPort = 2
MSComm1.Settings = "9600,N,8,1"
MSComm1.PortOpen = True
MsgBox MSComm1.InBufferCount
MSComm1.InputMode = comInputModeText
'Text1.Text = MSComm1.Input
MsgBox MSComm1.Input
MSComm1.PortOpen = False

errHandler:
If Err.Number <> 0 Then
MsgBox "Error No: " & Err.Number & ", Error Description: " & Err.Description
End If
End Sub
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
sportmed Messages postés 194 Date d'inscription mardi 15 mai 2007 Statut Membre Dernière intervention 25 janvier 2014 2
25 mars 2012 à 12:45
Option Explicit

Private Sub Form_Load()
   Show
   Text3.SetFocus
   Timer1.Enabled = False
   Check1.Caption = "Input Barcode"
End Sub

Private Sub Check1_Click()
   Timer1.Enabled = True
   Timer1.Interval = 10
   If Check1.Value = 1 Then
      Text1.Enabled = False                           'Disable Text1&2 while
      Text2.Enabled = False                           'Barcode reader is reading.
   Else
      Text1.Enabled = True
      Text2.Enabled = True
   End If
End Sub

Private Sub Text3_Change()
   If Check1.Value 0 Then Text3.Text ""             'Don't accept any input.
End Sub

Private Sub Timer1_Timer()
   If Check1.Value = 1 Then Text3.SetFocus
   Text3.Text = ""
   Timer1.Enabled = False
End Sub





marche pas
0
sportmed Messages postés 194 Date d'inscription mardi 15 mai 2007 Statut Membre Dernière intervention 25 janvier 2014 2
25 mars 2012 à 12:58
Bonjours
j'ai ce code mais marche pas



Private Sub CmdDone_Click()
   If Not Timer1 Then
      If MSComm1.PortOpen = True Then
         MSComm1.PortOpen = False
      End If
      Done = True
      Code$ = FrmScanSerial.TxtInput.Text
      Unload Me
   End If
End Sub


Private Sub CmdScan_Click()
Dim started
On Error GoTo Errorhandler
started = False
   DoEvents
   Timer1.Enabled = True
   Instring$ = ""
   TxtInput.Text = ""
   Done = False
   If MSComm1.PortOpen = False Then
      MSComm1.PortOpen = True
   End If
   lblaction.Caption = "WAITING FOR SCAN"
   Instring$ = ""
   Do While Not Done
      DoEvents
      Do While MSComm1.InBufferCount > 0
         started = True
         DoEvents
         Instring$ = Instring$ & MSComm1.Input
         Timer2.Interval = 100
         Timer2.Enabled = True
         Do While Timer2.Enabled = True
         DoEvents
         Loop
      Loop
      If MSComm1.InBufferCount 0 And started True Then
         Done = True
      End If
   Loop
   TxtInput.Text = Instring$
   Timer1.Enabled = False
   If MSComm1.PortOpen = True Then
      MSComm1.PortOpen = False
   End If
   lblaction = Len(Instring$)
Exit Sub
Errorhandler:
If Err = 8005 Then
   MsgBox ("Port Already Open - Change Settings and Select a Different Port Number")
   Exit Sub
End If
If Err = 8002 Then
   MsgBox ("Invalid Port Number - Change Settings and Select a Different Port Number")
   Exit Sub
End If

End Sub

Private Sub CmdSettings_Click()
   Dim Settings$, Port$
   Dim OldSettings$
   OldSettings$ = MSComm1.Settings
   On Error GoTo Errorhandler
   Settings$ = InputBox("Enter New Settings", , MSComm1.Settings)
   MSComm1.Settings = Settings$
   Port$ = InputBox("Enter Serial Port Number", , MSComm1.CommPort)
   MSComm1.CommPort = Port$
   Open App.Path & "\Port.ini" For Output As #1
   Print #1, Port$
   Close #1
Exit Sub
Errorhandler:
   If Err = 380 Then
      MsgBox ("Invalid Value")
      MSComm1.Settings = OldSettings
      Resume Next
   Else
      MsgBox (Error)
   End If
End Sub

Private Sub Form_Load()
Dim Outport$
On Error GoTo Errorhandler
   Open App.Path & "\Port.ini" For Input As #1
   Input #1, Outport$
   Close #1
   MSComm1.CommPort = Outport$
Exit Sub
Errorhandler:

If Err 55 Or Err 53 Then
   Open App.Path & "\Port.Ini" For Output As #1
   Print #1, "1"
   Close #1
   Outport$ = "1"
   MSComm1.CommPort = "1"
End If
End Sub

Private Sub Timer1_Timer()
   Timer1.Enabled = False
End Sub

Private Sub Timer2_Timer()
   Timer2.Enabled = False
End Sub



0
sportmed Messages postés 194 Date d'inscription mardi 15 mai 2007 Statut Membre Dernière intervention 25 janvier 2014 2
25 mars 2012 à 13:01
en plus autre code mais marche pas,

voir :
Private Sub Command1_Click()
Dim i As Integer
Dim hdib As Long
Dim n As Integer
Dim z As Integer
' Change this to your value:
n = 2
Call TWAIN_LogFile(1)
Call TWAIN_SetHideUI(1)
Call TWAIN_SetJpegQuality(75)
If BARCODE_IsAvailable = 0 Then
MsgBox "Barcode Function Not Available"
End If
If TWAIN_OpenDefaultSource() <> 0 Then
Call TWAIN_SelectFeeder(1)
Call TWAIN_EnableDuplex(1)
' Not guaranteed to work, check return = 1:
Call TWAIN_SetPixelType(2)
Call TWAIN_SetLightPath(0)
Call TWAIN_SetXferCount(n)
If TWAIN_SetAutoScan(0) = 0 Then
MsgBox "SetAutoScan(FALSE) failed - scanner cannot single-scan?"
End If
Call TWAIN_SetMultiTransfer(1)
If TWAIN_BeginMultipageFile("c:\image.pdf") = 0 Then
For i = 1 To n
' If you can't use Me.hwnd, pass 0:
hdib = TWAIN_Acquire(Me.hwnd)
If hdib = 0 Then
Exit For
End If
' <your image processing here>
' Get int of the barocde that is recognized
z = BARCODE_Recognize(hdib, 1, -1)
If z > 0 Then

[b]' this is the part I am having trouble with. I'm don't know how to use this function
MsgBox BARCODE_GetText(z, "")/b
End If

Call TWAIN_DibWritePage(hdib)
Call DIB_Free(hdib)
Next i
Call TWAIN_EndMultipageFile
End If
Call TWAIN_CloseSource
End If
If TWAIN_LastErrorCode() <> 0 Then
Call TWAIN_ReportLastError("Unable to scan.")
End If
End Sub


0
ucfoutu Messages postés 18038 Date d'inscription lundi 7 décembre 2009 Statut Modérateur Dernière intervention 11 avril 2018 211
25 mars 2012 à 13:53
Bonjour,
Il va peut-être être temps de comprendre qu'au lieu de copier et tester des codes, il va te falloir bûcher l'utilisation des dll qu'utilise TA douchette ! Donc : lecture de la documentation de TA douchette !
Aucune solution raisonnable en dehors de cette démarche !


____________________
Réponse exacte ? => "REPONSE ACCEPTEE" pour faciliter les recherches d'autres forumeurs.
Pas d'aide en ligne installée ? ==> ne comptez pas sur moi pour simplement vous dire ce qu'elle contient
0
Utilisateur anonyme
25 mars 2012 à 15:21
Bonjour,

Sans parler que la plupart des douchettes ne font que simuler le clavier.
Si l'on ouvre un banal bloc notes, on lui met le focus et on scanne un code, le chiffre apparait comme par magie


Cordialement


CF2i - Guadeloupe
Ingénierie Informatique
0
sportmed Messages postés 194 Date d'inscription mardi 15 mai 2007 Statut Membre Dernière intervention 25 janvier 2014 2
25 mars 2012 à 16:53
Etes-vous un exemple de l'établissement qui explique comment vous pouvez utiliser
merci
0
Utilisateur anonyme
25 mars 2012 à 16:57
Non nous ne sommes pas un exemple !! Loin de la...
Si l'on ouvre un banal bloc notes, on lui met le focus et on scanne un code, le chiffre apparait comme par magie



Cordialement


CF2i - Guadeloupe
Ingénierie Informatique
0
sportmed Messages postés 194 Date d'inscription mardi 15 mai 2007 Statut Membre Dernière intervention 25 janvier 2014 2
25 mars 2012 à 17:36
marche pas ami, "bloc notes".
0
Utilisateur anonyme
25 mars 2012 à 18:27
Bloc-notes = Notepad ===> programme ===> Notepad.exe

Dans le menu démarrer de Windows

Ça ce peux-tu un oiseau pareil ?
0
cs_ShayW Messages postés 3253 Date d'inscription jeudi 26 novembre 2009 Statut Membre Dernière intervention 3 décembre 2019 57
25 mars 2012 à 19:43
Salut
mieux vaut tard que jamais

ici

ici
0
sportmed Messages postés 194 Date d'inscription mardi 15 mai 2007 Statut Membre Dernière intervention 25 janvier 2014 2
25 mars 2012 à 23:01
Je veux juste la solution à ce problème est de l'aide, s'il vous plaît.
Je veux le code pour ce sujet et je vous remercie beaucoup
0
sportmed Messages postés 194 Date d'inscription mardi 15 mai 2007 Statut Membre Dernière intervention 25 janvier 2014 2
26 mars 2012 à 12:48
[^^sad1]
0
sportmed Messages postés 194 Date d'inscription mardi 15 mai 2007 Statut Membre Dernière intervention 25 janvier 2014 2
26 mars 2012 à 12:48
[^^sad2][^^sad1][^^sad2][^^sad1]
0
Utilisateur anonyme
26 mars 2012 à 17:16
Bonjour,

Bon, on recommence,

1) Si tu veux un code complet, gratuit et qui va fonctionner du premier coup et sans effort de ta part, ce n'est pas dans le forum que tu vas le trouver, mais dans la section des codes et si et seulement si quelqu'un qui a le même équipement et le même problème que toi a déposé un programme à la libre disposition de tous.

2) Si personne n'a déposé le programme parfait pour toi, tu as visiblement déjà quelques canevas disponibles. Il te reste juste à les modifier un peu pour les adapter à ton besoin spécifique et à ton équipement.

3) Si tu n'es pas prêt à faire un minimum d'efforts pour apprendre et comprendre ce que l'on t'a dit, eh bien tu resteras toujours un incompétent. La réussite s'obtient par l'effort.

4) À ton âge, tu devrais être assez vieux pour comprendre cela, non?
0
sportmed Messages postés 194 Date d'inscription mardi 15 mai 2007 Statut Membre Dernière intervention 25 janvier 2014 2
27 mars 2012 à 02:32
bonjour,

merci ami :"Cmarcotte" est pour vous tous...........


voir


j'ai acheté une lecture barre avec USB; j'ai télécharger ce driver;

elle s'appelle : " Honeywel Adaptus 5.0 Model 3800 g"


_ port USB 2

qui j'ai bien installé à mon PC avec ce driver, elle marche bien.

je vous SVP simplement un code qui permet de affiche les 13 caractère, dans

une zone de texte.

aide-moi SVP

est merci pour tous.
0
sportmed Messages postés 194 Date d'inscription mardi 15 mai 2007 Statut Membre Dernière intervention 25 janvier 2014 2
27 mars 2012 à 03:29
Lire des codes à barres
0
Rejoignez-nous