--- In [email protected], rukawa kaede 
<[EMAIL PROTECTED]> wrote:
>
> ada yg punya tutorial barcode dgn vb gak? 
>   apa saja yg diperlukan kalau mau membangun aplikasi inventory dgn 
barcode?
>    
>   terima kasih.

Prosedure untuk bikin barcode saya ambil dari source saya, semoga 
berguna.....


Private Sub Command3_Click()
Dim dep As String
Dim band As String
Dim hrg As String
Dim kode
Dim nama
Dim ESC
Dim LF
Dim NUL
Dim cqty1 As Integer
Dim cqty As String
Dim Jenis As String
Dim nol
ESC = Chr(27)
LF = Chr(10)
NUL = Chr(0)
kode = Trim(txtKdBarang.Text)
nama = Left(Trim(txtshortdesc.Text), 25)
nol = "0000"
'-------CEK QTY BARCODE
If Val(Text1.Text) / 3 <> 1 Then
   Text1.Text = Val(Text1.Text) + 1
Else
   Text1.Text = Val(Text1.Text) + 0
End If

 cqty1 = Trim(Str(Round(Val(Text1.Text) / 3, 0)))
 cqty = Mid(nol, 1, 4 - Len(Trim(cqty1))) + Trim(cqty1)

'cqty1 = Text1.Text / 3
'cqty = Trim(Str(cqty1))
'MsgBox (cqty)
'----- CEK HARGA
If Mid(kode, 3, 1) = "1" Then
    hrg = "1$"
ElseIf Mid(kode, 3, 1) = "2" Then
    hrg = "2$"
ElseIf Mid(kode, 3, 1) = "3" Then
    hrg = "3$"
Else
    hrg = "Other"
End If
'-------CEK RETUR
If Check2.Value = 0 Then
   retur = "  #"
End If

'-------cek Banded
If Mid(kode, 4, 1) > 0 Then
   band = "B`ed = " + Mid(kode, 4, 1)
End If
'----Cek Jenis
If Right(Trim(txtKdMerk.Text), 1) = "1" Then
   Jenis = ""
ElseIf Right(Trim(txtKdMerk.Text), 1) = "2" Then
   Jenis = "*"
Else
   Jenis = "*"
End If

'---DEPARTEMEN
dep = Mid(kode, 5, 1)
Open "LPT1:" For Output As #1
   Print #1, ESC + "D0180,0960,0180" + LF + NUL
   Print #1, ESC + "AX;+000,+000,+00" + LF + NUL
   Print #1, ESC + "AY;+01,0" + LF + NUL
   Print #1, ESC + "C" + LF + NUL

'  // POSISI LABEL

   Print #1, ESC + "PC000;0025,0025,05,05,C,+00,00,B,+0000000000" + 
LF + NUL  '//Nama
   Print #1, ESC + "PC001;0065,0158,10,05,C,+02,00,B,+0000000000" + 
LF + NUL  '//Harga
   Print #1, ESC + "PC004;0086,0049,10,05,A,+00,00,B,+0000000000" + 
LF + NUL  '//Kode Atas
   

   Print #1, ESC + "PC005;0345,0025,05,05,C,+00,00,B,+0000000000" + 
LF + NUL   '//Nama
   Print #1, ESC + "PC006;0415,0158,10,05,C,+02,00,B,+0000000000" + 
LF + NUL   '//Harga
   Print #1, ESC + "PC009;0406,0049,10,05,A,+00,00,B,+0000000000" + 
LF + NUL   '//Kode Atas



   Print #1, ESC + "PC010;0665,0025,05,05,C,+00,00,B,+0000000000" + 
LF + NUL   '//Nama
   Print #1, ESC + "PC011;0735,0158,10,05,C,+02,00,B,+0000000000" + 
LF + NUL  ' //Harga
   Print #1, ESC + "PC014;0726,0049,10,05,A,+00,00,B,+0000000000" + 
LF + NUL   ' //Kode Atas
   
   

' Format Barcode

'//                                    //Lebar 
Barcode           //Kode dibawah Barcode 1 = ada
       Print #1, ESC 
+ "XB00;0035,0065,9,3,03,0,0058,+0000000000,008,0,00" + LF + 
NUL '//Barcode
       Print #1, ESC 
+ "XB01;0355,0065,9,3,03,0,0058,+0000000000,008,0,00" + LF + NUL
       Print #1, ESC 
+ "XB02;0675,0065,9,3,03,0,0058,+0000000000,008,0,00" + LF + NUL
'// Format Data
    Print #1, ESC + "RB00;" + kode + LF + NUL
    Print #1, ESC + "RC00;" + txtVendorCode.Text + " " + nama + LF + 
NUL
    Print #1, ESC + "RC04;" + kode + retur + LF + NUL
   

    Print #1, ESC + "RB01;" + kode + LF + NUL
    Print #1, ESC + "RC05;" + txtVendorCode.Text + " " + nama + LF + 
NUL
    Print #1, ESC + "RC09;" + kode + retur + LF + NUL
   
    

    Print #1, ESC + "RB02;" + kode + LF + NUL
    Print #1, ESC + "RC10;" + txtVendorCode.Text + " " + nama + LF + 
NUL
    Print #1, ESC + "RC14;" + kode + retur + LF + NUL; ""

       Print #1, ESC + "RC01;" + Jenis + " - " + hrg + LF + NUL
       Print #1, ESC + "RC06;" + Jenis + " - " + hrg + LF + NUL
       Print #1, ESC + "RC11;" + Jenis; " - " + hrg + LF + NUL

Print #1, ESC + "XS;I," + cqty + ",0001C5200" + LF + NUL        ' && 
Black Mark

'Print #1, ESC + "T10C52" + LF + NUL   ' //Black mark
'If Val(cqty) < 10 Then
'   Print #1, ESC + "XS;I," + Trim(cqty) + ",0001C5200" + LF + NUL
'ElseIf Val(cqty) > 10 Then
'   Print #1, ESC + "XS;I," + "00" + Trim(cqty) + ",0001C5200" + LF + 
NUL
'ElseIf Val(cqty) > 99 Then
'   Print #1, ESC + "XS;I," + "00" + Trim(cqty) + ",0001C5200" + LF + 
NUL
'End If

Close #1
Text2.Text = Str(Text1.Text)
Frame6.Visible = False
Me.Command4.SetFocus
End Sub







Wahana Programmer Groups Links

<*> Untuk mengunjungi sponsor milis ini, klik link berikut:
    http://wahanaprogrammer.net

<*> Untuk menghubungi owner milis ini, kirim email ke:
    [EMAIL PROTECTED]

<*> Konsultasi pemrogramman bisa chat disini:
    Yahoo! Messenger: wahanaprogrammer
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Programmer-VB/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/Programmer-VB/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Kirim email ke