Solved

The code to print a form to a printer

Posted on 1999-01-22
7
124 Views
Last Modified: 2010-05-03
How to print any form to a printer ?
With or without graphics !
The sulution must work on any computer and on any printer. If it prints in color - Fine, but not necessery.

My own test doesn't works on screen having a higher resulution than VGA !
0
Comment
Question by:pgg
  • 3
  • 2
  • 2
7 Comments
 
LVL 10

Accepted Solution

by:
caraf_g earned 100 total points
ID: 1470109
PrintForm
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 1470110
Sorry for the brief answer:

In a Form module, to print the actual form
PrintForm

In any module to print any form
FormVariable.PrintForm
0
 
LVL 1

Expert Comment

by:MAVERICK
ID: 1470111
I tried a version using the paintpicture method....
Capture the form as a picture ..... then use printer.paintpicture.

regards
Jon

0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 1

Expert Comment

by:Johnn
ID: 1470112
Hey MAVERICK...where did you get your solution?  I posted that same one a few days ago..
0
 
LVL 1

Expert Comment

by:MAVERICK
ID: 1470113
From WATY...

Johnn: As promised I checked your solution .... It needs alittle more work to do with the window's handle .... If u took the get window handle code from waty ...It'd probably work...

No offense but... waty has some of the best written code around...



0
 
LVL 1

Expert Comment

by:Johnn
ID: 1470114
Maybe so...I was only doing it off the top of my head.  I never actually tested it(I leave this up to the questioner as I'm not being compensated for it(at least financially) as well as I beleive they need to "do it" themselves to really learn and understand the solution.

John
0
 
LVL 1

Expert Comment

by:MAVERICK
ID: 1470115
Thats one way to look at it .... but API programming is difficult at the best of times..... As I understand... using standard modules is a common time saver for programmers..

In any case .... pgg refer to http://www.experts-exchange.com/Q.10118894 for the capture codes.....



0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question