473,326 Members | 2,095 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Problems w/ Printing under XP

Up until now I have been able to avoid using Common Dialog by accessing printers
directly. This is no longer possible, so-

Using VB5 under XP Home Edition. I use the Common Dialog functions to select a
printer and output my data.

1. If I am in the VB5 IDE, the printer output appears to be non-proportional and
looks perfect because it all lines up.

2. If I am running the compiled program by itself, the printer output uses a
smaller font which apparently is proportional and the result is very ragged
looking as nothing lines up.

3. When I tried using the Common Dialog Show Font method, I got an error message
saying that no fonts were installed. (Word for Windows lists dozens of fonts so
they must be installed and all of them appear to be TrueType.)

Does anyone has any ideas about what else I might try?
Val Mehling
valjm16@DELETE_THISearthlink.net

XRL (Extreme Racing League) Info
http://extremeracingleague.com/
Jul 17 '05 #1
3 2638
> Up until now I have been able to avoid using Common Dialog by
accessing printers
directly. This is no longer possible, so-

Using VB5 under XP Home Edition. I use the Common Dialog functions to select a printer and output my data.

1. If I am in the VB5 IDE, the printer output appears to be non-proportional and looks perfect because it all lines up.

2. If I am running the compiled program by itself, the printer output uses a smaller font which apparently is proportional and the result is very ragged looking as nothing lines up.

3. When I tried using the Common Dialog Show Font method, I got an error message saying that no fonts were installed. (Word for Windows lists dozens of fonts so they must be installed and all of them appear to be TrueType.)

Does anyone has any ideas about what else I might try?


You have to tell the control which Fonts you want via the Flag property.
Assuming you named the control CommonDialog1 (the default)...

For Screen Fonts only
=======================
CommonDialog1.Flags = cdlCFScreenFonts

For Printer Fonts only
=======================
CommonDialog1.Flags = cdlCFPrinterFonts

For Both
=======================
CommonDialog1.Flags = cdlCFScreenFonts Or cdlCFPrinterFonts

Rick - MVP

Jul 17 '05 #2
On Wed, 25 Aug 2004 12:11:18 -0400, "Rick Rothstein"
<ri************@NOSPAMcomcast.net> wrote:
Up until now I have been able to avoid using Common Dialog by

accessing printers
directly. This is no longer possible, so-

Using VB5 under XP Home Edition. I use the Common Dialog functions to

select a
printer and output my data.

1. If I am in the VB5 IDE, the printer output appears to be

non-proportional and
looks perfect because it all lines up.

2. If I am running the compiled program by itself, the printer output

uses a
smaller font which apparently is proportional and the result is very

ragged
looking as nothing lines up.

3. When I tried using the Common Dialog Show Font method, I got an

error message
saying that no fonts were installed. (Word for Windows lists dozens

of fonts so
they must be installed and all of them appear to be TrueType.)

Does anyone has any ideas about what else I might try?


You have to tell the control which Fonts you want via the Flag property.
Assuming you named the control CommonDialog1 (the default)...

For Screen Fonts only
=======================
CommonDialog1.Flags = cdlCFScreenFonts

For Printer Fonts only
=======================
CommonDialog1.Flags = cdlCFPrinterFonts

For Both
=======================
CommonDialog1.Flags = cdlCFScreenFonts Or cdlCFPrinterFonts

Rick - MVP


Rick,
Will check that out tomorrow. Thanks.
Val Mehling
valjm16@DELETE_THISearthlink.net

XRL (Extreme Racing League) Info
http://extremeracingleague.com/
Jul 17 '05 #3
On Wed, 25 Aug 2004 12:11:18 -0400, "Rick Rothstein"
<ri************@NOSPAMcomcast.net> wrote:
Up until now I have been able to avoid using Common Dialog by

accessing printers
directly. This is no longer possible, so-

Using VB5 under XP Home Edition. I use the Common Dialog functions to

select a
printer and output my data.

1. If I am in the VB5 IDE, the printer output appears to be

non-proportional and
looks perfect because it all lines up.

2. If I am running the compiled program by itself, the printer output

uses a
smaller font which apparently is proportional and the result is very

ragged
looking as nothing lines up.

3. When I tried using the Common Dialog Show Font method, I got an

error message
saying that no fonts were installed. (Word for Windows lists dozens

of fonts so
they must be installed and all of them appear to be TrueType.)

Does anyone has any ideas about what else I might try?


You have to tell the control which Fonts you want via the Flag property.
Assuming you named the control CommonDialog1 (the default)...

For Screen Fonts only
=======================
CommonDialog1.Flags = cdlCFScreenFonts

For Printer Fonts only
=======================
CommonDialog1.Flags = cdlCFPrinterFonts

For Both
=======================
CommonDialog1.Flags = cdlCFScreenFonts Or cdlCFPrinterFonts

Rick - MVP


Problem Solved! Thanks again.
Val Mehling
valjm16@DELETE_THISearthlink.net

XRL (Extreme Racing League) Info
http://extremeracingleague.com/
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Vince | last post by:
I have a generic page that I use for printing content, and it contains an iframe into which I put the url for the page to be printed. I dynamically size the iframe so that it correctly displays...
3
by: Grim Reaper | last post by:
I print mailing labels out of Access 2000 databases about 3 to 4 times a week. I have been having problems with one thing since I have been printing mailing labels. I print mailing labels by...
1
by: Zeroeffect | last post by:
Hello! I have a database with alot of embedded images. The reason for having the images embedded is security. My problem is that it works fine on my computer, but not on my clients computer....
4
by: Tracey | last post by:
Hey folks, I have an ASP.NET web app that's working just fine, but a small percentage have two printing problems that don't happen to the vast majority of users. These problems are listed below...
1
by: Chad Dittmer via .NET 247 | last post by:
I'm having problems inserting into Sql 2000 using SqlHelper.ExecuteScalar. When it inserts, it only takes the first character from the string?? Any help would be appreciated. Here is the code and...
3
by: Alejandra Parra | last post by:
In my code, I print a dataSet ' get grid's PrintDocument object Dim pd As System.Drawing.Printing.PrintDocument pd = flexgrid.PrintParameters.PrintDocument() ' set up the page (landscape, 1.5"...
11
by: randomtalk | last post by:
hi, i have the following recursive function (simplified to demonstrate the problem): >>> def reTest(bool): .... result = .... if not bool: .... reTest(True) .... else: .... print...
0
by: Galen Somerville | last post by:
In VB6 (converted to VB2005) there are 6 different sub-menu items where the user has a choice of listing items on the screen or printing out a list of items. Each such menu item puts the name of...
1
by: Dreamtime | last post by:
Hi I am using Visual Studio 2005 and the bundled Crystal Reports (previously I used .net 2003 and bundled Crystal Reports for 2 years - same issues!) I have a report which is displayed in the...
3
by: Wilson | last post by:
i am very new to c++ and am creating a new program, below are two seperate parts of the program, made to run seperately, however the constructor in one works (prints "constructing" on the screen),...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.