Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




VB Printing To Zebra TLP2844 Printing


Hi all,

I am using to print some receipts with barcode to a Zebra TLP2844 printer from Visual Basic. The printing and alighnment all working fine and we are using the label of size 4.25" length * 1.25" width.

The problem is that after one label printed, the label continuously skipping, we want to stop at the start of next label. I have tried many way by adjusting the properties of the printer, but no effect. The following is the same code to use.

Can any one help help on this how we can stop the skipping once one label printed...?



Open printer.port For Output As #ff

Print #ff, Chr(13)
Print #ff, "N" + Chr(13)
Print #ff, "D" + <Darkness.Text> + Chr(13)

Print #ff, "A" + <CompanyNameX.Text> + "," + CompanyNameY.Text + ",0," + CompanyNameFont.Text + "," + CompanyNameH.Text + "," + CompanyNameW.Text + ",N," + Chr(34) + Companyname.Text + Chr(34) + Chr(13)
Print #ff, "B" + "150" + "," + "120" + "," + EO + "," + "1," + Trim(BarcodeN.Text) + ",1," + h + "," + EF + "," + Chr(34) + Trim(TestNumber.Text) + Chr(34) + Chr(13)
Print #ff, "P" & Quantity & Chr(13)
Close #ff




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Help Printing To Zebra Using EPL
Hi, I'm trying to print to a zebra LP2824 and whilst I can print line by line I can't seem to print using the EPL codes.

THis works okay;
Edit: Added VB Tags to make your code more readable.

Code:
Dim prt As Printer
Dim prtname As String

For i = 0 To Printers.Count - 1
prtname = Printers(i).DeviceName
If InStr(1, prtname, "Zebra") Then
cmbPrinters.AddItem Printers(i).DeviceName
If InStr(1, prtname, machineName.Text) Then
currentPrt.Text = Printers(i).DeviceName
End If
End If
Next i

For Each prt In Printers
If prt.DeviceName = currentPrt.Text Then
Set Printer = prt
Exit For
End If
Next

Printer.Print " Mr. Colin Evans"
Printer.Print " Somewhere in Wales,"
Printer.Print "SY12 34Y"
Printer.Print ""
Printer.EndDoc

but what i want to print is the following using the EPL codes

N
R130,0
ZB
A0,2,0,3,1,1,N,"Mr. Colin Evans"
A0,24,0,3,1,1,N,"Somewhere in Wales, "
A0,46,0,3,1,1,N,"SY12 34Y"
P1

I've tried the following

Code:
Dim Activestring As String

Activestring = "" & vbCrLf & "N" & vbCrLf
Activestring = Activestring & "R130,0" & vbCrLf
Activestring = Activestring & "ZB" & vbCrLf
Activestring = Activestring & "A0,2,0,3,1,1,N,""Mr. Colin Evans""" & vbCrLf
Activestring = Activestring & "A0,24,0,3,1,1,N,""Somewhere in Wales, """ & vbCrLf
Activestring = Activestring & "A0,46,0,3,1,1,N,""SY12 34Y""" & vbCrLf
Activestring = Activestring & "P1" & vbCrLf

Printer.Print Activestring
Printer.EndDoc
But all it does is print exactly what Activestring equals including all the EPL commands

N
R130,0
ZB
A0,2,0,3,1,1,N,"Mr. Colin Evans"
A0,24,0,3,1,1,N,"Somewhere in Wales, "
A0,46,0,3,1,1,N,"SY12 34Y"
P1

I've done a search but obviously I need to do something to tell the printer to accept the EPL commands

ANy idea's, thanks

Printing On A Zebra Without Pauses
Greetings to everyone.

I made a program that prints information on labels using a dot-matrix printer and now we are using a Zebra printer for thermal printing. I did not change the code and it prints OK, but the thing is that now with the Zebra if I print a rather large amount of information (say for a couple of hundred labels) the Zebra printer acts strange: it prints a row or "page" of labels but then it stops for a second, prints another row, stops, does this with a couple of rows more and then it prints the rest non-stop.

The problem is that here at work some of the labels need to printed by the thousands some times and when trying to do this instead of stopping like 7 times for 100 labels it stops about 20 times for 600 hundred labels, and the more labels the more it stops. In all cases the last portion of labels is printed non-stop.

I called Zebra and they recommended changing the printer port from ECP to AT, but that didn't help. This is the code:

Printer.FontName = "Arial"
Printer.FontSize = 8

For x = 1 to n 'labelstoprint
Printer.CurrentY = 500
Printer.CurrentX = 1000
Printer.Print = "Text to print"
Printer.NewPage
Next x

Printer.EndDoc

As you can see, each time I print a file is created with "n" pages and sent to the printer. I tried moving the Printer.EndDoc command inside the For-Next so that "n" files with 1 page were sent to the printer but the result is the same.

The question is: is there something I can do to make the printer print all the information non-stop?

For the moment we are not planning on using ZPL language because it would take more time to change the code.

Thank you very much in advance.

Zebra Printer Printing
I am converting code from IGP to ZPL and I wanted to know if anyone had any kind of code samples for me to look at.  

Here is an excerpt of what was coded in VB to a printronix printer.  What would it be like in ZPL?

Printer.Print "^PY^-"
Printer.Print "^PY^-"
Printer.Print "^F^-"       
Printer.Print "^H44^-"
Printer.Print "^IPAGE,LAND^-"
Printer.Print "^M0201420^T0040"; Format(Date, "y") 'julian date
Printer.Print "^M0100010^T0393 QUANTITY (Q)"  
Printer.Print "^I000^-"
Printer.Print "^O^-"
Printer.Print "^PN^-"
Printer.EndDoc     

Thanks to all who contribute in Advance!

-Sillygirl



Printing Using EPL2 To Zebra LP2844
I am trying to print EPL2 commands to a LP2844 Label printer but they are being interpreted as text - no matter what I do. (see code below) If however I type the commands into a .dat file and then copy the .dat file to LPT1 using a .bat file the printer prints fine???

Has this happened to anyone before? Any ideas?? THANKS
__________________________________________
Private Sub Command1_Click()
Dim Prt As Printer

For Each Prt In Printers
If Prt.DeviceName = Trim("Eltron LP2844") Then
Set Printer = Prt
End If
Next
Dim printForm As String
printForm = ""
printForm = printForm + "N" + vbCrLf
printForm = printForm + "D14" + vbCrLf
printForm = printForm + "A40 , 10, 0, 3, 2, 2, N, ""$999.99""" + vbCrLf
printForm = printForm + "P1" + vbCrLf
Printer.Print printForm
Printer.EndDoc
End Sub
_________________________________________

Printing To Zebra Printer With ZPL Or Printer Object
Hi,

I know that this question isn't all VB, but I tried to get some info in the barcode forum, but there isn't any traffic there so I thought I could try here.

For the past 10 or 15 years we have used two Zebra label printers hooked up to a computer via serial port and  have sent ZPL to it. We decided to upgrade to newer Zebra printers with network cards so we can print images on the labels, which they have pretty much done what I planned, but I am running into some complications.

With the new printers I used VB6’s printer object and set X and Y coordinates to print my text and bar codes on the labels just like I do with many other documents that I send to HP LaserJets. I am not going to get into the issues that I am having, because I don't think it is relevant (but if you think so I will post it).

My main question is everything I read says to write the txt file and send ZPL to the printer. Why is this used instead of VB6's printer object? I have about 80 users that send print jobs to these printers and wondered if creating a ZPL file was a better way of printing. And, if writing a ZPL text file, where would be a proper place to save the file before it is sent to the printer.

Any input or experience would be greatly appreciated, I am going crazy with this!


-UncleCake


Printing Printing Printing Printing Report Confused Help
Hey guys,

I want to print following bill. It has already been printed.
I want to fill some data in it and want to print it.

Have a look at attached image of the bill.
Dimensions are given too.

I tried with data report.
I put total field in report footer and send the value of this field from code itself.
But if there are 2 items then total field prints immediately after that.
whereas it should be printed at the bottom in front of the word TOTAL(printed in bill).

How to get it at right position?

How can I maintain the margins and dimensions each side?

Will data report do? or anything else should be right for doing this.

Help me people.

PLZ.

Kakadia.

Setting Printer In Draft Mode For DOS Printing Speed &amp; Output As DOS Printing
I want to print in Draft Mode with DOS Printing Speed using DataReport Designer. Anybody can help me How to set dot matrix printer in Draft Mode i.e., speed of printing must be same as DOS Printing Speed.
I am using Code:Printer.PrintQuality = vbPRPQDraft but this code is applicable for resolution quality and printing time is taking same as printing from Windows environment and I need output same as DOS Printing
Is there any special codes, functions or printer properties to be adopted for DOS Printing Speed. I appreciate if anybody can help me for giving me a sample project.
My email is : chemtsr@yahoo.co.in

Regards / MANI

Problem Printing EXCEL After Printing Using A Macro In WORD
I have a strange problem...

I have created a WORD template which contains some buttons to print the document on a certain printer, with or without a logo. This is some standard VBA and works OK.


Code:
Application.ActivePrinter = "HP LaserJet 4250 PS"
ActiveDocument.PrintOut
Now here is the problem:
A document is printed using the macro in WORD.
Then if I want to print something in EXCEL to the "HP LaserJet 4250 PS", nothing is printed!!
However, if I print the EXCEL-sheet to any other printer, it is printed and then the excel sheet can be printed again on the "HP LaserJet 4250 PS"...

(I use Office 2003)

I have no clue what is causing this problem and how to solve this...

Can anyone help me with this??

HOW TO Increase Printing Speed In VB For Bill Printing?
I am developing one application need bill printing option (Point of sales). How can i increase printing speed ? I wish to print bills in fast way ?

Senthil kumar

Printing Problem With EditCopy() When Printing An MsChart In VB.NET
Hello!

Please I really need help! Here's my problem: I have a MsChart graphic in a form and I would like to print it. I red many post about printing with MsChart but none had my answer. My graphic have modified axis values because I only want to show the positive axis parts (of x and y). My problem is that my axis settings appear in the form but not on the paper! I know that as soon as I use EditCopy() function in my printing process, axis settings return to their initials values. Look at this MSDN description of EditCopy():

"Since both the data and the picture of the chart are stored on the clipboard, what gets pasted into the new application varies depending on the type of application. For example, if you execute the chart's EditCopy method in your code and then go to an Excel spreadsheet and select Edit Paste, the chart data set is placed in the spreadsheet. To insert the picture of the chart into the spreadsheet, select Edit Paste Special and select the Picture type."

I was wondering how to keep my axis setting on the paper by printing only the part of my graphic that is shown in the form and not the full graph. Is there an other way to print a MsChart without using the clipboard (Since no arguments can by pass to editcopy() to make it work the way I want) ?

Thanks you

Gab

VB Printing Using Printform And Disabling The Printing... Notification Pop-up
Has anyone had any issues with using the (VB6.0) form.Printform statement and had a "Printing..." pop-up not go away. The application is simply printing a form and sometimes the notification pop-up "Printing..." remains on the screen. The application is running on a W/2000 server and the printer is spooled on this server. There are actually 15 different printers and the user can select the printer. This looks like a resource issue but I am completely mystified on this one. Help anyone... Rick..

VB Data Report Printing Vs Dos App. Printing Speed
I have convert the system into VB (before it was in foxpro).
So the reports I build using VB Data reports.
Now the problem is that on dot matrix printer, my VB-report takes much time to print report
but the old-foxpro-system-reports takes less time to print their reports(may be due to character wise printing).
So there is any way to print report from VB dos-base like (character wise).
Please help me soon, I am in bottleneck of this project.
thanx

Need Help Saving And/or Printing A Textbox... And Printing In General...
Hello.... my program's main important output is into a listbox and some labels i have arranged to give the imprssion of a spreadsheet... (if you get what i mean), now i think i can work out how to save the various labels into a file, and to put them onto a page ready to print.. but i havent the slightest idea how to print from a VB application, and especially to print OR SAVE a whole listbox, thats contents dont fit on one screen...

once again, ANY help would be HUGELY appreciated.
Thanks
Jai

Suggestion On Printing A From With High Quality Printing
I want to print a from and I use the following method:
I capture the form image to clipboard, send the contents of clipboard to an invisible picture box and then print that picture box. So i have the whole form image printed to the paper as I wanted. But the problem is the medium quality of the result. Can anyone suggest me a better way of printing the form (higher printing quality) ?
Thank you everyone for all possible replies...

Michael Vlastos
Automation Engineer
Company Modus SA
Development Department
Athens, Greece

Printing A Picture &amp; Printing A Box Around Text
I have a customer where I have to print many different reports. The customer desires 2 things, they are:
1. That the header containg their name, address etc. be printed on a receipt with a box surrounding the text. They would also like another section to have a box surrounding the printed data.
2. That a picture be printed at the top of the receipt showing their vineyard.

I could find no info in the many books that I have on how to do this.
Can anyone steer me in the right direction?
TIA
Dick Deeds

Detect Printing Error While Printing
hi,

Is there anybody know any VB API or any way i can use to detect printing error while printing in progress and return it (the error) back to the VB program to further process...

You help is greatly appreciated and thank you...

biosphere

Printer.PaintPicture Prints The Picture In Dos-based Printing Or Windows-based Printing
Printer.PaintPicture prints the picture in dos-based printing or windows-based printing ...?

Well Printing To HTML (not Printing A HTML Page)
How would I take a group of database records and create a HTML page from them (I would like to do without going thru Access, if possible)...

Basically, my real goal would be able to print custom reports I made user Printer.print and then give the user the option as saving this report in HTML (WYSIWYG fromat).

Any ideas? Is this far-etched?

Zebra Barcode And VB
Has anyone integrated Zebra BarOne software with VB?

If so, can you tell me what dll references to look for and what methods/properties/functions to use to get a string variable (containing both letters and numbers) to be printed via the software dlls

Thanks

Zebra And Smart Card
Have anyone any ideas how to move to specific folder in smart card and then read data from EF. Main command is "!U1 S-CARD CT_DATA (len) (ascii)"

I need to read cardnumber from specific EF file. Have anyone done something like this with Zebra 2SC mobile printer?

 

ZPLII Or Windowsdriver For ZEBRA Printer?
Hi,

Is there anyone out here with experience of ZEBRA labelprinters I use DA402. So far i use ZPLII and serial communication to the printer. But no my application needs to be able to print any language around our globe. Writing Russian, Eastern european, Chinese, and japanese is exciting. And its getting messy to handle all codepages and different characters on my own

So i tried out ZEBRAs windows printerdriver. It works ok then as a normal printer. I can now print any character that my computer can produce... BUT there always a BUT.

I loose controll over some things. Like layout of barcodes for example.

In ZPL I do like this.

^XA
^FO50,50^B2R,87,N,N,N^FD27150010006109^FS
^XZ

I will get a rotated barcode I2OF5 87 dots high, no interpretation line under, no interpretationline over and no checkdigit added. Exactly what i want

When i use windowsdriver i can only set the font to I2OF5 and set the sice so it match my 87 points then print the numbers 27150010006109. This will give me a
Not rotated barcode with interpretationline under. NOT WHAT I WANT

Do any of you know how i can controll my printing still using windows to have the grate gain of the forreign characters. But still be able to controll barcodes or other things like labelwidth, length. Is there a way to send ZPLII commands to the printer together with windowdsdriver on the same label?

Thanks for any suggestions
/Musson

** RESOLVED ** Zebra Barcode Printer Question ...
I am using a Zebra 4M 200 d.p.i bar code printer, and can't get it to accept my ZPL commands.

I have read the FAQ's on Zebras site, and it seems Windows based apps don't interprate these commands, but print them "as is", which is basically where I am at.

A solution is to change the driver to "Generic Text Only", which should resolve the issue. I changed it and now it doesn't print at all !!!

A check at this point (apparently) is to make sure that the "Control Prefix" and the "Format Prefix" are the same. They weren't. The "Control Prefix" was set to "~" and the "Format Prefix" was set to "^". I made them both "^" and still no joy, so I made them both "~" and guess what ...... !!!!

I am now running out of ideas, and I REALLY hope someone out there has some ZPL experience and can help me out .......


Thanks

How To Read From File And Print A Label On Zebra 6 M?
I need some help with printing a label from file. I have a code that writes to the Zebra printer.
What I need is to change my code to read from file and then send that to printer to print the label. As if i need to change something I will have to change only in my file not in the program.

My code
------------------------
sFolder = c est est.zpl
Set fso = CreateObject("Scripting.FileSystemObject")
If Not fso.FolderExists(sFolder) Then
    fso.CreateFolder (sFolder)
End If
sPort = "LPT1:"
lCount = 0
    Dim i As Integer
        For i = 1 To mxlabels
                Set txtfile = fso.CreateTextFile(sFileName, True)                               
                If Label = "test" Then
                    txtfile.WriteLine ("^XA")
                    txtfile.WriteLine ("^PRB^FS")
                    txtfile.WriteLine ("^FT516,173^A0R,118,93^FD" & sQTY & "^FS")
                    txtfile.WriteLine ("^FO607,0^GB0,1218,2,B^FS")
                    txtfile.WriteLine ("^FT785,25^A0R,31,18^FDPART NO. (P)^FS")
                    txtfile.WriteLine ("^FT176,25^A0R,31,18^FDSERIAL" & Sfield & "^FS")
                    txtfile.WriteLine ("^FO404,0^GB0,1218,2,B^FS")
                    txtfile.WriteLine ("^FO201,0^GB0,1218,2,B^FS")
                    txtfile.WriteLine ("^PF0^FS")
                    txtfile.WriteLine ("^XZ")
            End If            
            txtfile.Close
            fso.CopyFile sFileName, sPort
             'Pause after sending print job
            Call cmn_sDoEvents(200)
        Next
------------------------



Printing In VB
Hi guys..

I have a database (Access) and I have extracted all my data from the dbase. I have 2 questions here:

1. How do i open a text file and put all this data into it. Eventually, this will become a report in a text file

2. How do I print this text file?? I am using a network printer

Thanks!!

Regards
vivien

Printing
Hello

I have to print a picture, a couple of lines of text and quite a few variables (strings mostly). One sheet of paper has to be filled. these lines of text do not appear on any of my forms, but the variables do. Since I've got no clue how to code for printing , i'd like to ask for an easy but good way of doing this. I also have to generate a print preview. Can anyone help me? (i'm a complete newbie , so if i have to use some components that are not standard, tell me where to find them)

TIA

BTW: it has to be possible to run this on different computers with different printers.

Printing VBA Help
Need to print Microsoft Visual Basic Help file (which is displayed when Help menu is clicked in VBE) with the same directory way it is available, say, complete list of the contents & topic wise; similar to a book.
A command to print evrything in one go.
One can select the topic & print but the page formatting, say setting marging, is not available, so the printed one is occupying almost the whole page & not good for filing.
Can anyone guide?

Printing
I am just curious, how does the connection between a printer work, and is there a way to send a command to print a file through the parallel/LAN port?

Help Printing
I wrote a program for use in a restaurant POS (Point of Sale). The purpose of the program is to order food, keep track of sales, manage employee's time for payroll purposes, etc. There's only one problem... I don't know how to send a "ticket" to a receipt printer. Please keep in mind a receipt printer is not your typical printer... it prints on small thermal paper, like a Wal-Mart receipt would. Anyway, I don't think I need to use the .printform method because I don't wany any graphics, only text and I'm limited by paper size. So, does anyone know how I can send multiple lines of text to a receipt printer?

Help With Printing .doc From VB6
Here is a snip of my code. I can not seem to get anything to print from this code. neither local or network printer. I DONT get any errors, but it will not spool anything to the printers. Would someone help???


Code:
Private Sub cmdNewletterPrint_Click()

On Error Resume Next

Dim appWord As Word.Application
Dim docRef As Word.Document
Dim TempF As String

'RTB = RichTextBox

With RTB
TempF = App.Path & "News LettersTempFile.doc"
.SaveFile (TempF)

Set appWord = New Word.Application
appWord.Visible = True

Set docRef = appWord.Documents.Open(TempF)
docRef.PrintOut

docRef.Close wdDoNotSaveChanges
Set docRef = Nothing

appWord.Quit wdDoNotSaveChanges
Set appWord = Nothing

Kill (TempF)
.Text = ""
.SetFocus

End With

End Sub

Printing PDF's From VB 6.0
To All,

Sorry if this has been answered before, but I've searched this site numerous times, as well as the internet in general and I can't find the answer to my problem. I am trying to print a bunch of PDF's to a specific printer from VB. My programming skills are very strong and I know what I want to do ... I just lack a little bit of the OO declaration portion of VB. As suggested, have added "pdf.ocx" to my project.

I've found lots of snippets of code both here and on the internet, but none of them are complete enough to use - generally it is because they don't include the declarations. One example I found is: (Not including the Wait sub for brevity)

What is lacking is how is Pdf1 declared? I have tried numerous ways to define Pdf1, but none of them work. In the case below, how should I properly declare/define Pdf1.

Thanks in advance,

At wits end,

Jim

--------------------------------------------------------------------------------
Private Sub Form_Load()

dim w as Integer
dim ChosenFile(3) as String
'
' set the values for ChosenFile and w
'
For w = 1 To 3
Pdf1.LoadFile ChosenFile(w)
Pdf1.printPages 1, 1

Wait 5
Next w

End Sub

I

Printing IE In VB
I have a web link setup to a pdf. Using VB, I can open the the link using IE. Does anyone know how to automate printing the page from VB?

Thanks for the help.

Here is the code that I have so far:


Set Explorer = New SHDocVw.InternetExplorer
Explorer.Visible = True
Explorer.Navigate "http:\phx01.phx.com/reports/issrpts/Allcodes.pdf"

'This is where I need to be able to print the pdf

Set Explorer = Nothing

Printing
i have a question regardless the printing in VB. i used the code
"Printer.Orientation = vbPRORLandscape"
to print onlandscape then i add the code
"me.printform"
but how can i center the picturebox on the page and how can i fit it to the whole page..
please i am a new on VB programming and i need help..
thanks for advance
maha

Printing
Print data contents directly from the form using data control
along with access

Printing In VBA
hello,

I 'd like to print out the outcome displayed in an excel sheet and I've got a problem. the code is as follows:
Private Sub cmdprint_Click()
Dim y As Integer
y = bound3 + 12
DatabaseWorkSheet.Activate
Range(Cells(12, 1), Cells(y, 15)).Select
ActiveSheet.PageSetup.PrintArea = "$A$12:$O$y" ---&gt; error
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

I know I can't use a variable in that line causing the error. any ideas?

thanks,

TK

Printing In VBA
I want to print cells in excel directly to the printer by bypassing the driver so I have full control of the printers functions. In VB6 I would use code like the following below but it doesn't work in VBA. Is it even possible to do this in VBA or do I have to do something else to get the same results? What I'm trying to do is make labels on continuous paper with a dot matrix printer. If I use the simple printout command it formfeeds after printing which I do not want.

Private Sub Command1_Click()
Open printer.port For Output As 1
Print #1, cell1
Close 1
End Sub

Printing To PDF
OK - I tried searching the forums for info on this, but "pdf" is too short of a keyword to search with.

I am trying to set up a macro within my Excel Workbook that will allow users to print the file as a PDF. I am running across a small problem, though.

Here is what I would like to do, ideally:

1) Have the user run the macro
2) The macro will export the visible sheets in the workbook as a PDF document.

Here is what I am doing right now:

1) The user runs the macro
2) The macro attempts to print the workbook to a "prn" file, but gives me the following error:

Quote:




You are attempting to print a multi-page EPS file
Please print a single page to ensure that EPS output is correct.




How do I get rid of that error? Is there any way to cut out the middle man (Acrobat Distiller) and actually export the workbook as a PDF?

I would include the code I am using, but it works through multiple subs, and is somewhat complicated. If you need to see my code, I will include it.

Help With Printing
Say for example i have 3 printers connected to a computer. I need to print to one of them specifically without specifying it in the printer dialog box. I dont even want the printer dialog to come up. This printer is not and can not be the default printer of the computer. can anyone tell me how to specify the printer to be printed to?

Printing In VB Again...
Hello all,

Here is my problem. I have picture box on my form with labels, textboxes etc.

I want to send this picture box to a print preview form. I'm usi ngthe code found on here http://www.vb-helper.com/howto_print...ew_scales.html

I've changed it a little. Here is my code

I call the procedure via:
'User clicked print which will print customer
Dim wid As Single
Dim hgt As Single
'Make PreviewForm.HiddenPict behave as much
'like the Printer as possible.'

'Make it 8.5" by 11" in real size.
wid = PreviewForm.ScaleX(8.5, vbInches, PreviewForm.ScaleMode)
hgt = PreviewForm.ScaleY(11, vbInches, PreviewForm.ScaleMode)
PreviewForm.HiddenPict.Width = wid
PreviewForm.HiddenPict.Height = hgt

'Make it use the same scale as the Printer.
PreviewForm.HiddenPict.Scale (-1, -1.5)-(7.5, 9.5)

'Draw the preview onto the hidden PictureBox.
DrawPrintout PreviewForm.HiddenPict, Picture1
PreviewForm.Show vbModal, CUSTOMERS

The procedure DrawPrintOut is as follows:
' Draw the printout on prn, either a PictureBox
' or the Printer.
Public Sub DrawPrintout(prn As Object, Img As PictureBox)
' Make the object use 10 point Courier New.
' It is likely to be available on both the
' printer and in PictureBoxes.
prn.Font.Name = "Courier New"
prn.Font.Size = 10
prn.DrawWidth = 4

' Draw a 1" by 3" square in the upper left.
prn.Line (0, 0)-(3, 1), , B

' Center the text within the square.
'prn.CurrentX = (3 - prn.TextWidth(Text1.Text)) / 2
'prn.CurrentY = (1 - prn.TextHeight(Text1.Text)) / 2
'prn.Print Text1.Text
'' Copy the smiley face bitmap onto prn.
'prn.PaintPicture SmileyPict.Picture, 0, 1.25
prn.PaintPicture Img.Picture, 0, 1 / 25
End sub

Problem occurs on prn.PaintPicture Img.Picture, 0, 1 / 25 stateing its an invalid picture. Why?

If I were load a picture into the picture box all works well. Just won't print any of the labels even though they are visible in the picture box.

Help me please....

Printing A Tif
I was wondering if anyone could give me an idea how to get a tif to print in vb? I know there is a class that will let you do it in Java but am not sure how to code this in vb. I am able to print text to a default printer but also need to print tif's if a file is found in the folder for that date. Examples would be mucho appreciated. Thanks!!!!!!!!!!!

Printing Help
So I want to print some coupons for my uncle's beauty shop.

This is the thing each visit is 1 coupon 3 coupons makes 1 free thing of what u bought.

so u cut ur hair 3 times. U have 3 haircut coupons next time u show the coupons it will be free.

I need to print a form but.. I have no idea how to print and then change value of textbox1 for example.

Prints coupon 00001, textbox1.text = textbox1.text + 1 and then.. print again.

Anyone care to help me

Thanks in advance

Printing
I have only covered printing once for like 5 seconds. But I don't remember anything about it except something like Printer.whatever.... I think? If I were to click on a button, I want a label to print out but in a certain x/y position on the paper. Can somebody give me a simple code to look at to refer to?

Printing Help
Hello all!!
I am in need of some code for our company. Can anyone let me know how i can print an imagebox in vb6 to all availble printers on the network. Basically the imagebox will print to all printers on the network.? Can anyone help me here? Thanks!

Printing In VB
Hi All,

Currently I have a form that displays the results of a few sql queries accessing tables in one database. To print the information I have been doing a Control - Alt - Print Screen / copying into MS Word / Printing it out that way. What are some ways to print the form or data with a command button?

Thanks,

Derek

.TIF Printing
Can someone explain a little better why Visual Basic 6 can't print .TIF files. Is there any way at all? I tried out the GDI from onerror but my files are too big. Is there any other way to print .TIF from Visual Basic 6?

Also, I tried using the pdf.ocx. My code was pdf1.loadfile("file here") but it gave me an error saying someone about a class not set up right. LIB something. Sorry I don't have better information. Can someone give me some feedback? Thanks...

Printing
Does anyone know how i can print list boxs in one frame:

I have form that has 3 list box in it and want to print the list boxes all at once and in one page:

can someone please help me i need it urgent thanks.....

Printing
I don't know if this is the right place to post this, sorry if I've got the wrong area. Does anyone know if it's possible to print a form landscape on a page? Or possibly resize the printed form to take up the whole page? I'm currently only using the Form1.Printform command, so I may need to go further into it.

PDF Printing
I am trying to print to a PDF printer from VB5.0

the printer cannot be the default printer, I dont have the SDK

any one have any ideas

Printing From VB
I want to be able to print from the text boxes on my screen. However the text boxes are in an array.


Code:
rst.Open "Select Question From Questions, Archive WHERE Archive.Archive_Status = 'NA' AND Questions.Survey_ID = '" & ResultsID & "' AND Questions.Question_ID = '" & QuestionID & "'", cnn, adOpenKeyset

numlink = 1 'data_options = amount of questions needed

While Not rst.EOF

Load txtQuestions(numlink)

'Directly positions text boxes on the page
txtQuestions(numlink).Top = txtQuestions(numlink - 1).Top + txtQuestions(numlink - 1).Height + 100
txtQuestions(numlink).Left = txtQuestions(numlink - 1).Left
txtQuestions(numlink).Tag = txtQuestions(numlink).Top
txtQuestions(numlink).Text = rst("Question").Value

txtQuestions(numlink).Visible = False

numlink = numlink + 1

rst.MoveNext

Wend

rst.Close
If I wanted to print all of the text boxes, is it possible??

Printing Help
Hello all,

I can't figure something out and i have being searching for a long time. I am printing a variable that I have to a windows printer. My problem is that my variable is 624 characters, but only a very small portion of my variable gets sent to the driver.

Can you shed some light on this for me, some of my code is below.

If cmbPrinters.Text = "Main Printer" Then

For i = 0 To Printers.Count - 1
If Printers(i).DeviceName = gstrSecondPrinter Then
Set Printer = Printers(i)
Exit For
End If
Next i

MsgBox strLabelString
Printer.Print strLabelString
Printer.EndDoc


P.S. this is VB6

thanks so much

Copyright 2005-08 www.BigResource.com, All rights reserved