Print Picture Box (print A Form That Is Too Large For The Screen Or Page)
I got a picture box (Picture1), which contain several picture box'es, labels and Flex Grid tables, -which I would like to print. Picture1 is quite high (higher than the screen). I found some code that i modified, but the printing only get the labels proper. The Flex Grids and picture box'es only show the border, and not the contents.
Code:Private Const WM_PAINT = &HF Private Const WM_PRINT = &H317 Private Const PRF_CLIENT = &H4& ' Draw the window's client area. Private Const PRF_CHILDREN = &H10& ' Draw all visible child windows. Private Const PRF_OWNED = &H20& ' Draw all owned windows.
Private Declare Function SendMessage Lib "user32" Alias _ "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _ ByVal wParam As Long, ByVal lParam As Long) As Long
Private Sub Print_Click() Dim rv As Long Me.ScaleMode = vbTwips ' default With Picture2 .Top = Picture1.Top .Left = Picture1.Left .Width = Picture1.Width .Height = Picture1.Height End With Me.Visible = True DoEvents Picture1.SetFocus Picture2.AutoRedraw = True rv = SendMessage(Picture1.hwnd, WM_PAINT, Picture2.hDC, 0) rv = SendMessage(Picture1.hwnd, WM_PRINT, Picture2.hDC, _ PRF_CHILDREN + PRF_CLIENT + PRF_OWNED) Picture2.Picture = Picture2.Image Picture2.AutoRedraw = False
Printer.Print "" Printer.PaintPicture Picture2.Picture, 0, 0 Printer.EndDoc End Sub
Edited by - Zigar on 11/27/2003 3:31:21 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How Do You Print Screen Then Load That Picture Into The Form.picture Property?
This is something that I've been trying to do for ages, but I've never had any success- Does anyone know how to print screen with code and then load that picture onto a form? I've got most of my program written, but I can't figure how to load a picture from the clipboard onto my form. I have a SendKeys to send a print screen keypress, but I don't know if it works properly. Can anyone help me?
Thanks
Now, don't get me wrong, 'cause baseball's a great sport.
It teaches little children simple eye-hand coordination with little effort or exhaustion.
-byufan
Print Screen And Put Contents Into Picture Box
is there a way that i can take a screenshot like pressing print screen, but have the program do it, and put the image in a picture box?
if someone can help me with this that would be great.
ps. also is there a way to scan over the now pasted image for a certain color pixel, and get its location? any help would be greatly appreciated.
Print Large Pricturebox Or Form In Vb6
Hi friend,
I need to print picturebox or form in vb6, which contain other controls & user controls. I
used several methods like capture screen or printform method but the form size which i m
using is large and during printing visible area of the screen print ok but the form area
which is invisible showing in black. can u suggest some ideas for the same. If u get any
Edit:
This is apublic forum where everybody benefits from the "shared" knowledge.
Asking to reply to by e-mail is a sort of "not fair" if you wish.
regards
kishor
Problem With Print, Page Setup, And Print Preview In A Text Editor...
Yes, I have another question.
When I use these exact same functions (with WebBrowser.ExecWB in place of txtScrapbook.Text) in my web browser, it works perfectly. But when I use them in reference to a text box, it doesn't.
Can you tell me where the problem lies, or give me an alternative method? I have a common dialog box already for other functions, so feel free to make use of it if you need to. Thanks.
Code:Private Sub PageSetup_Click()
txtScrapbook.Text OLECMDID_PAGESETUP, OLECMDEXECOPT_DODEFAULT
'opens page setup dialog
End Sub
Private Sub Print_Click()
txtScrapbook.Text OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER
'opens common dialog box prompting user to print current web page/parts of current web page
End Sub
Private Sub PrintPreview_Click()
txtScrapbook.Text OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_DODEFAULT
'opens print preview dialog
End Sub
How To Print Images That Fit To The Page Size Specified In Print Common Dialog?
i need some help in printing the whole image tat fit onto the paper size i specified in Print Common Dialog. I hav a PictureBox array & each PictureBox contains a smaller Picturebox inside. For example : Picture1(index) has a smaller Picture2(index) inside. There are vertical & horizontal scrollbars next to each Picture1(index).
i already hav the basic Print Common Dialog code below. Here's the problem -> I can print out the pictures displayed inside Picture2(index) but the printout will turn out truncated or just part of the whole picture when im printing to a 4R photo size for example and the image displayed in Picture2(index) is larger then the bounding Picture1(index) & i need to use the scrollbars to scroll and view the other portions of the image.
So how to modify the code below to print out the whole image tat fit nicely to the paper size i specified. Thanxs.
'---------------------------------------------------------------------
'CODE
'---------------------------------------------------------------------
CommonDialog1.CancelError = True
On Error Resume Next
CommonDialog1.Action = 5 ' Start the Print Common Dialog
If (Err.Number = cdlCancel) Then Exit Sub
'when Cancel is pressed, exit subroutine
'Code to print the array here
For Pics = Picture2.LBound To Picture2.UBound
If Picture2(Pics).Picture > 0 Then ' If the PictureBox is not empty
Printer.PaintPicture Picture2(Pics).Picture, 0, 0
Printer.EndDoc
End If
Next
'---------------------------------------------------------------------
Print Form Fit Exactly To A A4 Page
how do i print a form that can fit (or fill up the whole page) a A4 size page?..cuz when i print the form it prints only half the page ....
Print A Form On Page?
Hi there!
Does anyone know what kind of code I need to get a small, simple form to rpint out centered on a
standard 8X11 piece of papaer? I know how to use PrintForm, but I want to make it look nice, so
therefore centering it on the page would be desireable.
Thanks for your help!
Print Column Header On Each Print Out Page
I am trying to put the header of each column on each print out page.
Right now I have it only appearing on the first page of my printouts.
How do you do that in Excel 2003?
How Can I Print Same Form Two Times In Same Page ?
Dear sir,
How can i print same form two times in same page ?
Code:
Me.PrintForm
Me.PrintForm
if i do like that then it will print in two page.
but i want in same page then how to do it ?
Thanks,
Raghu Bhandari
Print Form On Page At Different Locations
I am working on a project where i need to print the current form at any location on the printed page. i want to print the screen in the horizontal center of the form at the top edge. i then want the printer to stop at the bottom of that form, move up only one line and print the next form that appears on the screen, same for the third form. i have tried the current x, current y, screen width, 1/2 etc. Every time the form prints in the upper left corner of the page and automatically ejects the page. PLEASE help as quickly as possible. thank you jct
Print Full Page Form ?
How do you get a form to be a full page when you print it. I can only print on about the first half of the page.
Margin To Print A Form Page?
Hi all,
I was trying to print a form in VB 6. I could print the form but I couldn't allign it according to my wish. Ineed the form to be centre alligned. Plz help me resolve this problem...
Thank you,
One who fails in his attempts is not a looser, But one who fails to make attempts is a looser.
Print Form To Fit The Page-Urgent
THis is simple question and may be answered many times on this forum.
I am just in urgent so I request you to answer this. (If possible with source code)
How to print the client area of the form to fit the page ?
THanks
Nagesh
Print A Form In A Full Page.
Hello guys...
I am trying finding a solution but not yet got one.
I have a form (I am trying to create an invoice) with labels and text boxes. When I print this form, the entire form been printed on a half page of paper which does not look good for an invoice.
1. I would like to know if I could print the form in a full page of a paper?
2. I can break the form into two forms and print both form in one page.
DOES ANYONE HAVE ANY IDEA???
PLEASE HELP ME....
Thank you,
Kethees
How Do I Print Out To The Form/screen/label
Hi
I am very new to VB
I want to print out the beginning and ending years which I will be getting from the user. This is for a Future Value Calculator i am coding.
For example
Enter Beg Yr:1990
Enter Ending Yr: 1995
I need to print out this, like 1990 to 1995 on the form.
ie 1990
1991
1992
1993
1994
1995
Can I use a label or text box? What do I need to use and how do I do it, and what syntax do I use.
Thanks
Shelton
How To Print A Form That Doesn't Fit In The Screen?
I already posted this ones but I didn't get any answers so...
In my project I have many kind of formas and all of them includes lines and CheckBoxes which seems to be the most difficult objects to print. I have tried to use the PictureBox for printing but the CheckBoxses doesn't appear in a print. Only the lines and labels and some controls does.
Also I have tried to use the RoboPrint tool that is a shareware program but it does not print right my forms. For example the vertical lines prints in dashed and captions of CheckBoxes disappear in some CheckBoxes even if it does show in the print preview. Unfortunately the PrintForm method is sadly useless to me because some of my forms are too large to fit on the screen.
Is there any other print program that handles printing much better or is there any other solution? Give me some tips please.
Print Full Page Form [solved]
I need to create a form that send himself to the printer and it must fit the page
is there any way to:
- increase the max height of a form (800 px->???)
or
- send the form to the printer as a picture or something like that
or
- send data line by line to the printer (different fonts and a picture are in the form)
or
- any other idea
(must be free)
thanks in advance
Stretch The Form To Cover A Whole Page At Print
I would like to stretch this form so that it could cover an entire sheet of paper (landscape) when it prints. but the form is much smaller.
What are the options?
put a picture of the form in a picturebox and stretch that?
has anybody already done this?
Thanks
Wengang
Print Entire Form Including Off Screen
Hi
I have an application which displays the results from a vehicle diagnostic machine. I use the Innovasys FramePlus control as a container for several shape controls to represent the status of the leds on the machine. To produce the printout I have an invisible form with a standard frame containing labels for the customer information, then 2 x FramePlus controls to show the before and after state of the leds. I then print this form using Form.Print. Everything prints perfectly on my system.
Now to my problem - I have found, like many before me I now realise, that when the form is printed on a system with a lower screen resolution only the part of the form which would be on the screen were it visible is printed.
After much searching I have not found a solution which fits my situation,can anybody here please help me out of this hole which I have dug for myself?
Andy
Print Form As Picture?
All
I am trying to print the contents of a form and three listviews, so far I can print the form on one page and the contents of my listviews on other pages.
Is there a way to save my whole form as a picture to the printer so I can add the rest of my data below it on the same page?
Something similar to
Code:
Printer.PaintPicture frmPerson.Picture
Or is there another method?
cheers
Gibbo
Put A Big Picture In The Form And Print It !!Pls Help
Hi, I am newbie here... Please help me with the following issues:
I have scan a picture, the size is 7 inch (w) * 3.2 inch (H). but it seems to be very big when I put into my form (> 7*3.2 inch) ...
Any body have an idea on this?
I would like to print out something (say My Name) into the form (with picture)... but I couldn't fit the picture in the form...an hence, i canot adjust the position for the final print.
Please advice ..Thanks
Print Form With Picture Box
I want to print a form with picture boxes on, but when I use PrintForm, the picture doesnt show on the print. Anybody know how to solve this problem?
I have also tryed to use different ways of capture the form (which I found somewhere in vbCity), but the problem whith this is to print the complete form. -I miss the part of the form that doesnt show on the monitor. I also got the windows taskbar on the print..
Hope somebody can help!
Zigar
Print Form On Full Page In Visual Basic
hello friends
I am developing an application in which i have to print the form .I have used printform command but i am not able to print the form on the whole A4 size sheet.I have tried various combinations of the printer properties (landscape,portrait) but nothing happened.
The problem with printform is that i am getting my output on only half of the A4 size sheet.
Please send you kind sugestions asap
Thanks
HELP Print Listview Print To Many Page
HI
I am using this to print Listview
When I print 1 page then it is ok but
if data from Listview go on 3 or 4 page then fyrst page is ok
efter fyrst page I only get 1 data on on each page
so this can be many page
Can somone help me what is wrong in this ??
Printer.Font = "Tahoma"
Printer.FontBold = True
Printer.FontUnderline = False
Printer.FontSize = 10
Printer.Print "Print from listview"
Printer.FontUnderline = False
Printer.Print vbNewLine
Printer.CurrentX = 1440
Printer.CurrentY = 1440
PrintListView lvwDataCopy
Printer.EndDoc
Private Sub PrintListView(lvw As ListView)
Const Margin = 60
Const COL_MARGIN = 240
Dim ymin As Single
Dim ymax As Single
Dim xmin As Single
Dim xmax As Single
Dim num_cols As Integer
Dim column_header As ColumnHeader
Dim list_item As ListItem
Dim i As Integer
Dim num_subitems As Integer
Dim col_wid() As Single
Dim X As Single
Dim y As Single
Dim line_hgt As Single
xmin = Printer.CurrentX
ymin = Printer.CurrentY
' ******************
' Get column widths.
num_cols = lvw.ColumnHeaders.Count
ReDim col_wid(1 To num_cols)
' Check the column headers.
For i = 1 To num_cols
col_wid(i) = _
Printer.TextWidth(lvw.ColumnHeaders(i).Text)
Next i
' Check the items.
num_subitems = num_cols - 1
For Each list_item In lvw.ListItems
' Check the item.
If col_wid(1) < Printer.TextWidth(list_item.Text) _
Then _
col_wid(1) = Printer.TextWidth(list_item.Text)
' Check the subitems.
For i = 1 To num_subitems
If col_wid(i + 1) < _
Printer.TextWidth(list_item.SubItems(i)) _
Then _
col_wid(i + 1) = _
Printer.TextWidth(list_item.SubItems(i))
Next i
Next list_item
' Add a column margin.
For i = 1 To num_cols
col_wid(i) = col_wid(i) + COL_MARGIN
Next i
' *************************
' Print the column headers.
Printer.CurrentY = ymin + Margin
Printer.CurrentX = xmin + Margin
X = xmin + Margin
For i = 1 To num_cols
Printer.CurrentX = X
Printer.Print FittedText( _
lvw.ColumnHeaders(i).Text, col_wid(i));
X = X + col_wid(i)
Next i
xmax = X + Margin
Printer.Print
line_hgt = Printer.TextHeight("X")
y = Printer.CurrentY + line_hgt / 2
Printer.Line (xmin, y)-(xmax, y)
y = y + line_hgt / 2
' Print the rows.
num_subitems = num_cols - 1
For Each list_item In lvw.ListItems
X = xmin + Margin
' Print the item.
Printer.CurrentX = X
Printer.CurrentY = y
Printer.Print FittedText( _
list_item.Text, col_wid(1));
X = X + col_wid(1)
' Print the subitems.
For i = 1 To num_subitems
Printer.CurrentX = X
Printer.Print FittedText( _
list_item.SubItems(i), col_wid(i + 1));
X = X + col_wid(i + 1)
Next i
y = y + line_hgt * 1.5
Next list_item
ymax = y
' Draw lines around it all.
Printer.Line (xmin, ymin)-(xmax, ymax), , B
X = xmin + Margin / 2
For i = 1 To num_cols - 1
X = X + col_wid(i)
Printer.Line (X, ymin)-(X, ymax)
Next i
End Sub
Print A Page Without My Print Button!!!
My question concern my web page:
How can i print an html page without it's print button.
I figure out how to hide the button when pressed(with layers)
but when it's finish printing or the user cancel,
how can i make the button visible,i know how but on
what event.
some1 have an idea??
Print Draw Picture And Other Detail In One Form
hi there
got a question to ask regarding printing. I would like to know how to print the drawn graph on picture and database table along with other numerical number in one form? So far i use form5.printform which it print everything except the picture. How can this be done?
Also i would like to know how can i print the whole form in a full a4 size paper. I m using landscape for printing orientation
many thanks
sun
CRYSTAL REPORTS 9 DOES NOT PRINT THE SECOND TIME I CLICK THE PRINT BUTTON ON MY VB6 FORM
the first time i click the print button on my vb6 form the report appears on the screen but on subsequent clicks it does not
the code i have written is follows
private sub commandprint_click
dim CRAPP AS CRAXDRT.APPLICATION
dim REPORT AS REPORT
APPPATH = "C:WFBIN"
REPORTPATH = APPPATH + "" +"INVOICE.RPT"
SET CRAPP = NEW ARAXDRT.APPLICATION
SET REPORT = CRAPP.OPENREPORT(REPORTPATH)
frmmain.crviewer91.reportsource = REPORT
frmmain.crviewer91.viewreport
SET CRAPP = NOTHING
SET REPORT = NOTHING
end sub
is there anyting missing ? Kindly help at the earliest
Guidelines For Form.Print And Printer.Print?
Hi,
Can somebody please provide some guidelines on when and where I can use the Form.Print and Printer.Print codes. I've just spent hours trying to understand what works and what doesn't I've tried to find information in the standard MS manuals and I have searched this site without much success.
Simply, I want to print out the value of some variables at various stages of program execution for debugging purposes. Actually there are many hundreds of values so I don't want to copy them from the screen onto paper manually.
Let's take a simple case
Printer.Print "Hello"
Printer.EndDoc
Seems straightforward and code like this is listed in many sources. It just would not work for me! The code would apparently execute but no printout appeared
This code was included in a Standard (.BAS) Module, but it just would not work.
I tried the same code in a Form subroutine and called it from the Form.Load event, but it still didn't work.
Finally, I called the same routine in the form from a Command Button - it worked - Hooray!
I put the subroutine back into the BAS module and called it from the same Command Button in the form but it no longer worked.
No error messages appeared anywhere
I found the same type of behavior with the Form.Print and associated codes.
Perhaps I'm being very dense here, but is this behaviour expected? If so, how can I print variable values from within .BAS modules?
Thank you to anybody who can shed light on this idiosyncratic behaviour.
Andy T.
System
VB6 SP5
CPU Athlon XP 2800+
Windows XP Home
Brother HL5040 laser printer (default)
Print Enitre Form..? / Print Form Sizeable?
First off.. I would like to give some credit to all of those that come here and help the people out, read threw code, mod code, you deserve much credit.
Im printing the contents of a VB form with Me.PrintForm.. the form is larger than the screen (it uses scroll bars) it only prints out what the client is viewing and not the whole form. I need the whole form printed. Is there a simple way to do this? Or a way to control the print size?
Im in a bind.. any help would work, I appreciate it.
Painting Large Picture To Screen...
Hi All -
I've got a program that paints a large image to the screen (captured from a framegrabber in a separate DLL and returned to my VB program in an array).
Here's the general outline of the code I've been using:
hBMP = CreateCompatibleBitmap(Picture.hdc, Picture.ScaleWidth, Picture.ScaleHeight)
hDestDC = CreateCompatibleDC(Picture.hdc)
SelectObject hDestDC, hBMP
(... Some code to collect the image, stored in DisplayImageArray() ...)
' Paint the image to the screen
For i = 0 To DisplayWidth - 1
For j = 0 To DisplayHeight - 1
indx = i + j * DisplayWidth
SetPixelV hDestDC, i, j, RGB(DisplayImageArray(indx), DisplayImageArray(indx), DisplayImageArray(indx))
Next
DoEvents
Next
BitBlt Picture.hdc, 0, 0, Picture.ScaleWidth, Picture.ScaleHeight, hDestDC, 0, 0, &HCC0020
Picture.Refresh
Call DeleteDC(hDestDC)
Call DeleteObject(hBMP)
This is working OK for me with smaller images (like 512x512 pixels), but when I increase the images to 1024x1024, there is a very noticeable delay before the image is painted to the screen. Is there any way for me to speed this up?
For example, could I write a C++ function in a DLL which would take the handle of picture object and the image array and then paint that onto the form? If so, how would I go about doing that? I am not all that familiar with Windows API functions, and the above code was constructed by looking at examples from other people...
Thanks for any advice!
LL
Print Large Number Of Rows
I have a few hundred rows of data to print, but they span only 3 columns, with not many characters in each column. I'm wondering if there is a print setting (similar to Word) that can create "print" columns so my data comes out on less paper. Basically put page one data in a left column and page two data in a right column on printed page one, etc... all the way through the print job. I can think of a couple of ways to force this in the code by rearranging the data but I'd rather not if there is a page setup setting I don't know about that will give me the same result.
Any ideas?
Producing Large Print Jobs In VB
I need to produce a large number of customer statements from within a Visual Basic application - 50,000 customers at 2 pages per customer = 100,000 total pages. I need to be able to both send the pages to a printer but also save them to file. My normal report writer, Crystal Reports, seems totally incapable of dealing with this volume. Does anyone have any recommendations for tools/technologies to deal with large printing needs in the client/server environment?
Print Command, Large Amounts Of Text
In VBscript, is there a way to do
Print END_OF_MULTILINE_TEXT
blah blah blahb lablksj;ldfjsd
fsdf
sdfsdf
sdfsd
END_OF_MULTILINE_TEXT
I'm not sure what it's called, but it's where it prints all the text inbetween the multiline_text lines and you don't have to worry about special characters ending the quotations and that sort....??
Large Print From Attached Program. Opinions And Advice Please?
OK, last question and I'm done for a little while.
This is an ongoing project. My Excel spreadsheet is linked via a function to interface with an AS 400 Emulator program, allowing me to directly read data on the screen with VBA.
My problem is this:
We are printing about 20 or 30 screens from the emulator. Since I work in a high security environment, each print will also generate a cover sheet that is usually thrown away. I would like to consolidate these 30 prints into a single print of 15 to 30 pages.
My opening portion of the eventual solution is this:
Option 1
Read the data on screen into an array.
Code:
Option Base 1
Dim a_strScreenContents(24)
For Count = 1 to 24
With PS(3)
a_strScreenContents(Count) = .GetText(Count,1,80)
End With
Next
Then Open a word document and send each line to the word document. Tack on a couple of vbLF or set a pagebreak. Loop until everything's batched into Word, then print.
Option 2
Put the contents of the screen into the clipboard
Code:
With PS(3)
.SendKeys "[edit-copy][edit-copy]"
End With
And paste into an open word document. Tack on a couple of vbLF or set a pagebreak and loop until the entire job is batched into Word. Print.
I need opinions. What would be the best course of action? I am leaning towards option two, but there are cases when this would not be desirable because it destroys the content of the clipboard and that may be upsetting to some people. Option one would seem slower to me, however speed is not critical. Only reliability.
Coding notes:
I've already assumed that I will need to set the WORD references to be able to manipulate the word document, but need a nudge on how to open a new document, preferably in the user's temp folder.
How To Print Large (1mx1m) Wallpaper With Labels, Lines, Textboxes ??
hallo !
I need to print wallpaper, to copy it from Form with large picture box (1m x 1m, much larger than screen) with 3000 labels, lines, text, textboxes ... and distribute it on A4 printer pages for test ??
How VB can do it ?
Or how to do it with the aid of Paint or CorelDraw program?
Display/print Large Text String To Console/command/prompt
Hi,
I'm trying to wite a vb console programming and having difficulties in displaying text in the command prompt.
Any help would be appriciated, I'm looking at something similar concept as the command "dir" where it's display all the directory/file on the command prompt. How can I achive this in VB? where I have a text string to display.
Thanks,
Ikuzu.
Print Page That Contains Last Value
Hi,
I am using VB6 to access an excel document. What I want to do is find the last value of a range (a1:a100) and print only the page that the last value appears on.
Example:
Say the last value in that range is in cell a79, and a79 appears on the third page of the file, vb6 now only prints page 3 (which contains a79).
I hope that makes sense and that you are able to assist me.
Thanks again.
Daniel.
Page Set Up Before Print
Hi All,
Glad to be the member of this Forum.
Is it possible to make "Page 1 of ?" option as the default footer in Page Set up. That is every I shouldn't be selecting the option before printing.
Please help.
Thanx
Print A A4 Page
I have two fields in my database
They are :name and ID
The original layout is:
Name ID
Tom 1
Mike 2
Jack 3
Allan 4
I would like to print it like:
Name ID Name ID
Tom 1 Jack 3
Mike 2 Allan 4
anyone knows ? thank you !!! thank you !
Keep asking question until the end of the world....
Help Please With 2 Page Print Out.
Ok I am new to VB6 and I ran into a problem. When I print out a report from a text box the report ends up being 2 pages which it is suppose to be, but here is the problem. The first page prints out fine with a top margin of about 1/2 inch, but the second page looses the top margin data and prints the first line of the second page about 2 mm from the top of the page instead of 1/2 inch top margin.
I just want the second page to have the 1/2 top margin also what do I need to do?
here is my code so far.
Private Sub cmdPrint_Click()
'USE API TO PRINT
If (DisplayPrinter(txtReport.hWnd, centerForm:=True)) Then
Printer.ScaleLeft = -0.5 * 1440 'left margin
Printer.ScaleTop = -0.5 * 1440 'top margin
Printer.CurrentX = 0
Printer.CurrentY = 0
Printer.Font = "ARIAL"
Printer.FontSize = 12
Printer.Print txtReport.Text
Printer.EndDoc
MsgBox "Report has printed successfully."
End If
End Function
any suggestions or code would really be appriciated. Please make it as simple as possiable, since I am really new at vb6 thanks,
Print On New Page
Hello i have 2 questions, my first one is how do i print to my printer?
I think its something like Print.Printer but im not sure.
For my second question: i know that there is a code that when i add it it will print automaticly to a new page on my printer even when the page isnt full yet. I thought it was something like Chr12 to print on a new page but i forgot what it was. Hope anyone can help me out here.
Print New Page
I would like to know, How I can print the picture and put the picture in a new page after print the contents in the listview?
Code:
For i = 1 To ListView1(0).ListItems.Count
Printer.Print Tab(5); ListView1(0).ListItems(i); _
Tab(25); ListView1(0).ListItems(i).ListSubItems(1); _
Tab(45); ListView1(0).ListItems(i).ListSubItems(2); _
Tab(65); ListView1(0).ListItems(i).ListSubItems(3); _
Tab(85); ListView1(0).ListItems(i).ListSubItems(4); _
Tab(105); ListView1(0).ListItems(i).ListSubItems(5); _
Tab(125); ListView1(0).ListItems(i).ListSubItems(6); _
Tab(145); ListView1(0).ListItems(i).ListSubItems(7)
Next
Printer.Print "Legend": ForeColor = vbBlack
Set Picture2 = LoadPicture(App.path & "output.bmp")
Printer.PaintPicture Picture2, 60, 13000, 2000, 800
Printer.EndDoc
Print A Web Page
How to print a web page pogramatically from within Vbcode? (The web page should not appear on the screen ie. it should be loaded in background or in a web control)
Print 1st Page Of PDF
How do I Print the 1st page of a PDF? I currently use:
VB Code:
ShellExecute(hDesktop, "Print", "somefilename.pdf", vbNullString, "C:",0)
but it prints it all when I just want the first page.
thanks
---edit---
the program used Crystal Report Application server, so i just used the export feature to word and used the word application object to print page 1, but thanks for all of the interest.
Help. How To Print More Than 1 Page ?
Hi peeps, i have 2 probs.
Im new and have spent days on this forum learning all that i have learned so far.
THANKS ALL
After much searching i have finally found how to print the contents of my msflexgrid.
I have 2 problems that i am hoping your goodselfs can help with.
1. ) The data i have in the flexgrid is more than 1 page but can not get the rest to print. how can i get the printer to manually feed the next page and continue printing. ??
current code i am using is.
Private Sub Command5_Click()
Printer.ColorMode = vbPRCMMonochrome
Printer.PrintQuality = vbPRPQDraft
Printer.Orientation = vbPRORLandscape
Printer.PaintPicture Grid1.Picture, 0, 0
Printer.EndDoc
End Sub
2. ) Less inportant.
whilst printing the flexgrid, i would like to print in the background my logo so it is like a hologram. ?
Not sure if this can be done with the print command or if it can be included into the msflexgrid as a background image.
Hope you can help.
Thanks.
Print The Web Page
Working with the printer is a pain...
I had an idea to display what I wish to print as a web page in a hidden webbrowswer and the tell that webbrowser to print
webbrowser1.print
but there is not print method
there must be a way!
|