Click here to Skip to main content
15,899,754 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<pre lang="cs">public void drawbarcode()
       {
           try
           {
               string Fontname = comboBox1.Text;
               String degree = comboBox4.Text;


               BaseBarcode b = BarcodeFactory.GetBarcode(GetEnum(Fontname));

               b.ChecksumAdd = checkBox1.Checked;
               b.ChecksumVisible = checkBox2.Checked;
               b.Number = textBox1.Text;
               b.Rotation = GetEnumdegree(degree);





               pictureBox1.Image = b.Render();
               panel1.Controls.Add(pictureBox1);
               panel2.Controls.Remove(label25);



           }



Posted

You actually can't. I have no idea what this code snippet is supposed to tell us, but C# can't tell what size your monitor is, therefore it cannot work out how to draw something to be 1 cm or 1 inch on the screen.
 
Share this answer
 
just see the link .download the exe and run .in the bottom of the software there is scale.just like that i want to make and also want to write text above and below
the link is
http://barcodesoftwaretool.com/downloads.htm[^]
 
Share this answer
 
Comments
Christian Graus 30-Jun-11 5:08am    
Don't push 'answer' to post something that's not an 'answer', push 'Comment' or edit your post. Your code is too poorly written for you to be doing this for a paid client ( and your question too basic ). Are you intending to use this code yourself ? Just buy the product you linked to, if it does what you want. Writing your own is clearly beyond you. You put text on a form by writing it yourself, or putting it in the right type of control. I told you that already, and if you don't know that, you certainly don't know how to do anything remotely complex or worthwhile. Buy a book and work through it if you want to learn how to program.

Yes, if you're printing, you know the page size, so you can scale to that. That's different to having an actual measure on the screen. You'd draw this also in your paint event, or just create a graphic that looks like this. Again, if you can't do these things, there's more complex things this program does that you could never do. Buy the program. Even if people here do all the work for you, you won't be able to fix bugs, add features, or in any other way do what programmers do.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900