Spire.Barcode is a professional barcode library specially designed for .NET developers (C#, VB.NET, ASP.NET, .NET Core) and Java developers (J2SE and J2EE) to generate, read and scan 1D & 2D barcodes.

Sun Aug 10, 2014 5:59 pm

Hi

I'm looking to create bar codes from data inputted into a textbox field but am having some trouble understanding how to use the library.

I created a text box and a button. I do have the library installed as well and I added the control to the form.

my button code

Code: Select all
        BarCodeControl1.Data = TextBox1.Text
        BarCodeControl1.Data2D = TextBox1.Text

        BarCodeControl1.Type = Spire.Barcode.BarCodeType.Code39


Now I want to output the data as a barcode but I can't figure out how.

Elochai
 
Posts: 3
Joined: Sun Aug 10, 2014 5:43 pm

Mon Aug 11, 2014 7:37 am

Dear Elochai,

Thanks for your inquiry.

Please add following code to save and view the barcode image.
Code: Select all
BarCodeControl1.SaveToFile("test.png");
System.Diagnostics.Process.Start("test.png");

Please feel free to contact us if you have any problems.

Best regards,
Burning
E-iceblue support team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Tue Aug 12, 2014 10:48 pm

I'm getting errors now when I try to run the problem.

Warning 1 The currently targeted framework ".NETFramework,Version=v4.0,Profile=Client" does not include "System.Design, Version=4.0.0.0, Culture=neutral which the referenced assembly "Spire.Barcode" depends on. This caused the referenced assembly to not resolve. To fix this, either (1) change the targeted framework for this project, or (2) remove the referenced assembly from the project. SM Barcode Creator

Elochai
 
Posts: 3
Joined: Sun Aug 10, 2014 5:43 pm

Wed Aug 13, 2014 3:36 am

Dear Elochai,

Thanks for your inquiry.

I guess your project's target framework is .NET Framework 4 Client Profile.
Please set it to .NET Framework 4.

Please feel free to contact us if you have any problems.

Best regards,
Burning
E-iceblue support team
Last edited by burning.liu on Thu Aug 14, 2014 1:17 am, edited 1 time in total.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Wed Aug 13, 2014 9:24 pm

After digging around to find the setting for the framework. I got it works now.

Elochai
 
Posts: 3
Joined: Sun Aug 10, 2014 5:43 pm

Thu Aug 14, 2014 1:20 am

Dear Elochai,

Thanks for your feedback.
Please feel free to contact us if you have any problems.

Best regards,
Burning
E-iceblue support team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.BarCode