Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print form image

Status
Not open for further replies.

Andrzejek

Programmer
Jan 10, 2006
8,486
5
38
US
I have a big VB6 Project with many Forms. Boss wants me to provide him with "Screen Shots" of every form (who knows what for?). If I do it 'by hand', it will take days.

I did try
* File - Print... - Current Project option, Form Image checkbox, and send it to the printer. The issue is, a lot of the controls (frames and other containers) on many forms print as black rectangles so you cannot see any controls placed in those containers.
* Print to File - that did create a file, but I have to specify the name (which is fine) and the extension. I have no idea of what type of file VB creates this way?

In perfect world, I would like to make a printout of entire Form, including the title bar at the top, and maybe even the Form's name.

What can I do?



---- Andy

There is a great need for a sarcasm font.
 
Forms have a PrintForm method. It isn't completely ideal, as it only prints the client area of the form (i.e. no borders or title bar). You can iterate the forms and call the method on each form found (of course this isn't completely straightforward ...)

You'll also need a print driver that can print to a file in a selected graphics format and, for convenience sake, doesn't prompt for a filename. One such product is ImagePrinter Pro. Unfortunately it isn't free, but it does the job.
 
Turns out, Boss wanted me to provide him with "Screen Shots" for somebody else. What I gave him - some printed Form images - was not what he wanted. So I asked him what he really wanted. Well, he doesn't know, and the people who asked for it don't know either. Why do they bother people? [ponder]

But thank you for your suggestions. I'll keep it in mind if 'they' come back to bother me again. [laser]


---- Andy

There is a great need for a sarcasm font.
 
File|Print... in the IDE can also print your forms.

But if they have no idea what they want it is sort of a moot point.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top