السلام عليكم ورحمة الله
في الفيجوال بيسك 6 استخدم طباعة الباركود عن طريق اداة ال BarcodeX
قمت الان بأضافة الاداة الى الفيجوال 2013 ولاكن احتاج طريقة استخدام الكود والكود في الفيجوال 6 كالتالي :
For Each Prt In Printers
' Or Prt.DeviceName = "RB2"
If Prt.DeviceName = "barcode" Then
SetDefaultPrinter Prt.DeviceName
DoEvents
DoEvents
End If
Next
On Error Resume Next
Dim I As Byte
For I = 1 To Val(txt_print_count)
Printer.CurrentX = Text3.Text
Printer.CurrentY = Text4.Text
Printer.Print itm_name
Printer.CurrentX = Text10.Text
Printer.CurrentY = Text11.Text
Printer.Print Namee
Printer.CurrentY = Text9.Text
Printer.CurrentX = Text8.Text
Printer.Print com_name
Printer.PaintPicture BarcodeX1.Picture, -Text2.Text, Text5.Text
Printer.CurrentY = Text6.Text
Printer.CurrentX = Text7.Text
Printer.Print "SR " & txt_price; " .00"
Printer.EndDoc
Next I
Dim Prt As Printer
في الفيجوال بيسك 6 استخدم طباعة الباركود عن طريق اداة ال BarcodeX
قمت الان بأضافة الاداة الى الفيجوال 2013 ولاكن احتاج طريقة استخدام الكود والكود في الفيجوال 6 كالتالي :
For Each Prt In Printers
' Or Prt.DeviceName = "RB2"
If Prt.DeviceName = "barcode" Then
SetDefaultPrinter Prt.DeviceName
DoEvents
DoEvents
End If
Next
On Error Resume Next
Dim I As Byte
For I = 1 To Val(txt_print_count)
Printer.CurrentX = Text3.Text
Printer.CurrentY = Text4.Text
Printer.Print itm_name
Printer.CurrentX = Text10.Text
Printer.CurrentY = Text11.Text
Printer.Print Namee
Printer.CurrentY = Text9.Text
Printer.CurrentX = Text8.Text
Printer.Print com_name
Printer.PaintPicture BarcodeX1.Picture, -Text2.Text, Text5.Text
Printer.CurrentY = Text6.Text
Printer.CurrentX = Text7.Text
Printer.Print "SR " & txt_price; " .00"
Printer.EndDoc
Next I
Dim Prt As Printer