我有c#条形码的例子,但我看不懂它是怎么添加上去的,在工具箱里找不到该控件!我引用了,但COM组件添加不上

解决方案 »

  1.   

    你上面的是已经转化成的托管dll,应该有个MSBCODE9.OCX组件,直接引用这个。
      

  2.   

    this.barcodeControl2 = new Cobainsoft.Windows.Forms.BarcodeControl();
      // 
                // barcodeControl2
                // 
                this.barcodeControl2.AddOnCaption = null;
                this.barcodeControl2.AddOnData = null;
                this.barcodeControl2.BackColor = System.Drawing.Color.White;
                this.barcodeControl2.CopyRight = "";
                this.barcodeControl2.Data = "000000";
                this.barcodeControl2.Font = new System.Drawing.Font("Arial", 9F);
                this.barcodeControl2.ForeColor = System.Drawing.Color.Black;
                this.barcodeControl2.HorizontalAlignment = Cobainsoft.Windows.Forms.BarcodeHorizontalAlignment.Center;
                this.barcodeControl2.InvalidDataAction = Cobainsoft.Windows.Forms.InvalidDataAction.DisplayInvalid;
                this.barcodeControl2.Location = new System.Drawing.Point(30, 35);
                this.barcodeControl2.LowerTopTextBy = 0F;
                this.barcodeControl2.Name = "barcodeControl2";
                this.barcodeControl2.RaiseBottomTextBy = 0F;
                this.barcodeControl2.Size = new System.Drawing.Size(218, 69);
                this.barcodeControl2.TabIndex = 1;
      

  3.   

    建议你研究下BarTender这个条形码软件。有第三方开发库。很方便。几行代码就搞定打印了。有些第三方库的条形码打印出来扫描枪(精度低点的)根本扫描不出来。
      

  4.   

    https://www.cnblogs.com/polk6/p/5052786.html