我們要實現上圖中的效果,需要如下的操作:
設置控件的寬度和高度,見下圖;
VB: Private Sub BarcodeButton1_BarcodeScanned(sender As Object, e As BarcodeData)Handles BarcodeButton1.BarcodeScanned Dim strScan As String = e.Barcode TextBox3.Text = strScan End Sub
C#: private void BarcodeButton1_BarcodeScanned(object sender, BarcodeData e) { string strScan = e.Barcode; Label10.Text = strScan; }