Zebra scanner not scanning9/23/2023 ![]() Set up a default button on the form so whenever ENTER is pressed the click event of the button will be executed.Remove the USB_Barcode_Scanner namespace and all references to the events it exposes.Configure the scanner to send ENTER both before AND after the barcode data is transmitted.PictureBox1.DrawToBitmap(bmp, new Rectangle(0, 0, pictureBox1.Width, pictureBox1.Height)) īased on the question and comments, here is a basic outline of a viable solution: Private void PrintPicture(object sender, PrintPageEventArgs e)īitmap bmp = new Bitmap(pictureBox1.Width, pictureBox1.Height) PrintDocument pDoc = new PrintDocument() Private void btn_Print_Click(object sender, EventArgs e) PictureBox1.Image = Barcode.Draw(txt_IT_NO.Text, 50) Private void btn_generate_Click(object sender, EventArgs e)Ĭode128BarcodeDraw Barcode = BarcodeDrawFactory.Code128WithChecksum Private void btn_init_Click(object sender, EventArgs e) Using (command = new MySqlCommand(query4, cmb_IT_Equip_NO.Text) String query4 = "SELECT IT_Equipments_No FROM equipments WHERE IT_Equipments_No = (connection = new MySqlConnection(conn4)) ![]() String conn4 = "server=127.0.0.1 port=3306 Database=et_system_pl uid=root pwd= CharSet=utf8mb4 " Private void cmb_IT_Equip_NO_SelectedIndexChanged(object sender, EventArgs e) Using (command = new MySqlCommand(quer圓, cmb_Equip.Text) String quer圓 = "SELECT Equipment FROM equipments WHERE Equipment = (connection = new MySqlConnection(conn3)) String conn3 = "server=127.0.0.1 port=3306 Database=et_system_pl uid=root pwd= CharSet=utf8mb4 " Private void cmb_Equip_SelectedIndexChanged(object sender, EventArgs e) Private void btn_exit_Click(object sender, EventArgs e) MessageBox.Show("Please check internet connection.") Using (command = new MySqlCommand(query2, cmb_Equip.Text) Ĭmb_IT_Equip_NO.Items.Add(dr.GetString("IT_Equipments_No")) String query2 = "SELECT IT_Equipments_No FROM equipments WHERE Equipment = (connection = new MySqlConnection(conn2)) String conn2 = "server=127.0.0.1 port=3306 Database=et_system_pl uid=root pwd= CharSet=utf8mb4 " ![]() MessageBox.Show("please check internet connection.") MySqlDataReader dr = com.ExecuteReader() Ĭmb_(dr.GetString("Equipment")) MySqlCommand com = new MySqlCommand(Selectquery, SelectConnection) String Selectquery = "SELECT DISTINCT Equipment FROM equipments" MySqlConnection SelectConnection = new MySqlConnection(con) String con = "server=127.0.0.1 port=3306 Database=et_system_pl uid=root pwd= CharSet=utf8mb4 " Private void BarcodeScanner_BarcodeScanned(object sender, BarcodeScannerEventArgs e) ![]() How can i change it? Does it belong from this barcode scanner settings or this code? Maybe below code helps: using System private void BarcodeScanner_BarcodeScanned(object sender, BarcodeScannerEventArgs e)Īfter this modification it compiled correctly but after launching it instead focusing on textbox I try to scan but it begins from button and scans into combobox in below is image of the app: In this project I added a library: using USB_Barcode_Scanner Īnd then I added and modified in public method: public PrintLabel()īarcodeScanner barcodeScanner = new BarcodeScanner(textBox1) īarcodeScanner.BarcodeScanned += BarcodeScanner_BarcodeScanned Īnd new method was automatically generated. Generating barcode is working well but is a little worse with scanning it by Device Zebra DS3608. I'm writing app which can not only generate barcode from combobox but will scan barcode into textbox.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |