|
-
Mar 26th, 2007, 02:24 PM
#1
Thread Starter
Lively Member
-
Mar 26th, 2007, 03:43 PM
#2
Re: Bar Code
From what I have seen in the many threads about it, all you need for barcodes is a font - which you can print or show on screen.
This means that the what you save to the database is simply the text of the barcode.
To find out what font(s) to use (and where to get them), search for the previous barcode threads, as several of them contain good advice.
-
Mar 26th, 2007, 09:31 PM
#3
Thread Starter
Lively Member
Re: Bar Code
i hv downloaded the fonts 3of9 but dont know further wat to do with it . in the next step...
also how can i print the lables.....
-
Mar 27th, 2007, 10:58 AM
#4
Re: Bar Code
First of all you need to install the font - you can do that in the Fonts section of Control Panel.
To print labels with it, you use normal printing code (just change the font to yours), eg:
vb Code:
Printer.FontName = "3of9"
Printer.FontSize = 12
Printer.Print "01231212" 'your barcode value
Printer.EndDoc
To draw it on screen, you can simply use normal controls (label/textbox/...) with the font changed as apt.
-
Mar 28th, 2007, 04:06 AM
#5
Thread Starter
Lively Member
Re: Bar Code
Thanks for your help
Really need one more favor..
i.e i wan to print the lable as
barcode lines ||||||||||||||||
Barcode # Cat ID + ITemID
Amount 500
one more thing the # of time to print on the paper row wise
i mean to ask dynamicaly changes the # of colums in a row ...
from 5 to 5 or 5 to 4..
barcode font
3 of 9
Barcode font dowloaded from http://www.squaregear.net/fonts/free3of9.shtml
-
Mar 28th, 2007, 08:54 AM
#6
Re: Bar Code
I don't understand what you mean I'm afraid, can you explain in more detail?
-
Mar 28th, 2007, 01:41 PM
#7
Thread Starter
Lively Member
Re: Bar Code
i have downloaded the fonts 3of9 and installed them. i hav printed them . they work fine.now i want to print the lables as i hve explained
i.e
name of the item
'--------------
barcode |||||||||||||||
db value 50-50
then the price 500.
'---------------------------
this all will be printed as a single lable.
where 50-50 is the item id from database. such as (catID + itemid) a mix combination.
then printing options are .
user wants to print the 5 lables in one row of a single paper. or 4 lables in one row.. (same lables) to hv some space adjustments on a A4 Paper size.
i hope u got the point...
one more thing
wat should should i hav to cater when designing the db coz its my first attempt of Barcode. so really confused.
until now i hv installed the fonts. use the script to print the lables.
now printing the lables as the customer wants explained above. is one thing i had to do.
-
Mar 28th, 2007, 03:01 PM
#8
Re: Bar Code
To print out other data simply change the font, and use .Print again. For other things you can do (such as lines) see the printing tutorial in our Classic VB FAQ's.
To do multiple labels, simply place the code in a loop - except the .EndDoc line, as that marks the end of the document.
For the database, simply store the barcode value as a varchar/text data type.
-
Apr 13th, 2007, 12:01 AM
#9
New Member
Re: Bar Code
Hi, since we're in the subject of barcodes...does anyone knows how to increase the height of the barcode? instead of adding the barcode fontsize?
as in...remain fontsize 12 but would want it to be slightly taller or shorter?
I can replicate this in DOS / ASCII mode through LPT1...but through VB all i get is increasing FONTSIZE and im running out of SPACE on output...
-
Apr 13th, 2007, 12:39 AM
#10
Re: Bar Code
to increase or decrease you can adjust the height of the label and the font size...increase the font size and decrease the height of the label...
Otherwise you need to get third party barcode controls like Mabry control, using which you can do whatever you want to do, its paid control
If an answer to your question has been helpful, then please, Rate it!
Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.
-
Apr 15th, 2007, 04:31 AM
#11
New Member
Re: Bar Code
Thanks for the reply! ^.^v ok here's the thing. What do you mean the height of the label? im running this printout through a SATO CT400 label printer and the current code im using is as below :-
Printer.CurrentX = 2900
Printer.CurrentY = 120
Printer.FontSize = 20
Printer.FontBold = False
Printer.FontName = "Free 3 of 9 Extended"
Printer.Print "*" & var1 & "*"
A very straight forward change font size for height for barcode. Any links you know of? I'd want to replicate these into an output and not on the form.
-
Apr 15th, 2007, 11:17 PM
#12
Re: Bar Code
 Originally Posted by linkin182
I'd want to replicate these into an output and not on the form.
Im sorry, I thought you want to increase the font height in the form...you need to try some 3rd party tools only...
If an answer to your question has been helpful, then please, Rate it!
Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.
-
Apr 16th, 2007, 02:53 AM
#13
Re: Bar Code
Have you thought of simply printing the barcode twice?
Obviously there would be a space between the two barcodes - but with careful adjustment of the .CURRENTY you can remove that space.
-
Apr 18th, 2007, 05:05 AM
#14
New Member
Re: Bar Code
I'd give that a thought...thanks alot...
-
Apr 18th, 2007, 04:17 PM
#15
Re: Bar Code
 Originally Posted by linkin182
I'd want to replicate these into an output and not on the form.
Output into what? A database? The printer?
If you want to print multiple labels, just reset your X and Y and print. It'll take a little experimentation to get all the labels lined up exactly.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Apr 19th, 2007, 07:19 AM
#16
New Member
Re: Bar Code [URGENT]
Hi i am new to vb.net as most people are on this forum. I have been looking thru some threads that mentions abt barcoding and stuff. First of all i am trying to create a Point of Sale system for a clothing shop which does not have a manufacturer barcodes on the item, so i guess i will have to make my own barcodes and print them out. So far i have not done any programming on this, bt i have, however, downloaded and installed the "3of9" fonts. So where do i go from here? Do i need to have a field call "barcode" on my inventory table in my database and make up some numbers on it? and also if i buy a barcode scanner from the shop do i still need to write some code to interface it with my program?
Hope someone can provide me some codes or link me to some thread to start me off in this.
Thanks
Jon
Programs im using for this:
VB.net Express Edition
MS Access 2003
-
Apr 19th, 2007, 03:20 PM
#17
Re: Bar Code
1) Use UPC codes. There's an industry standard - if the UPC code starts with "2", it's not a real UPC code, so you can use it, even externally, and it won't cause problems. You will have to create valid codes or the scanner won't read them.
2) Yes, if you want to keep the barcode, you'll need a barcode field. Just make a plain char-type field.
3) How you interface the scanner depends on the scanner. Most of them look, in software, like keyboards, so you just wait for keypresses - there's one for each character and a vbCr at the end. Trap the vbCr (If KeyAscii = vbCr Then) in your KeyPress sub for the control that's getting the barcode (a text box?) and you'll know when a barcode has been entered (or someone hit the Enter key).
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Apr 23rd, 2007, 09:00 PM
#18
New Member
Re: Bar Code
@ Al42 : Output as in via printer. Can be on any form, whether its on paper or labels.
@ tquereshi22 : Dude, you can try my code above if you want to print it out. just make sure you end your print session with "Printer.enddoc"
Btw, tried printing twice and it made my barcode taller..:P thanks guyz.
-
Apr 24th, 2007, 03:55 AM
#19
New Member
Re: Bar Code
Hi guys i used the IDAutomation componets for creating and printing barcodes. I am stuck on how to bind data to the barcode as it does not provide any tutorial on the IDAutomation website. The data i want to bind is itemid, price and item name, which is the field on my database table "tblitem". And also after the data is binded how do i scan the barcode and make the bind data to appear on the listview box.
This is urgent so please if any of you have any codes which can help to start me off, then please do.
Thanks
Jon
software used for project:
VB 2005/VB.NET
MS ACCESS 2003
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|