Re: paintpicture



paintpicture only prints the graphical portion of the control; this excludes
other controls you may have in the picture box.

: Picture2.Picture = Picture2.Image '<--- what does this do?

Think of the picture box control as having two drawing surfaces - the
persistent image represented through the picture property, and the drawing
canvas represented as the image property. If you perform graphic functions
on the picture box (eg write out text to the picturebox using the Print
statement), you are drawing the text on the image canvas. In order to save
the picture you loaded into the picture property along with the new text you
added, you have to assign (combine) the image canvas image to the picture
canvas image. That's what this line does.

--

Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/

Please reply to the newsgroups so all can participate.




"G Doucet" <someone@xxxxxxxxxxxxxxx> wrote in message
news:1K2Wf.50664$VV4.820254@xxxxxxxxxxxxxxxxxxxxxxxxxx
:I just found out about the PaintPicture method as I was searching the web a
short while ago. I am using it to print a Picture
: control. The Picture control's Picture property is a bitmap file and it
gets printed on the page fine. Unfortunately, the Label
: controls that I have in the Picture control ~don't~ get printed.
:
: In a microsoft example, http://support.microsoft.com/kb/230502/EN-US/,
(which doesn't explain exactly what I want to do), I saw
: where they wrote
:
: Picture2.Picture = Picture2.Image '<--- what does this do?
: Picture2.AutoRedraw = False
:
: Printer.Print ""
: Printer.PaintPicture Picture2.Picture, 0, 0
: Printer.EndDoc
:
: I have no idea what the first part does but I tried it and it didn't help.
:
: Does anyone have any ideas?
: Guy
:
:

.



Relevant Pages

  • RE: Adding Bound Pictures to an Access Database
    ... except in the case where I don't have a picture for a student. ... Dim strPath As String ... you have the Image control, not either of the Object controls. ... UI I'm not sure where you'll find it, but the Picture property should be ...
    (microsoft.public.access.modulesdaovba)
  • RE: Adding Bound Pictures to an Access Database
    ... except in the case where I don't have a picture for a student. ... Dim strPath As String ... you have the Image control, not either of the Object controls. ... UI I'm not sure where you'll find it, but the Picture property should be ...
    (microsoft.public.access.modulesdaovba)
  • Re: Question on Alberts video regarding A2010
    ... The browser control works for both web based, ... Would I use this browser control the continues form to display the rooms? ... I just used the new picture control we have in access. ... those pictures are stored in database. ...
    (comp.databases.ms-access)
  • Re: putting a picture onto a userform without using the vba window
    ... control in the list and select. ... picture disappears. ... MsgBox "No picture on clipboard" ... Private Declare Function IsClipboardFormatAvailable Lib "user32" (_ ...
    (microsoft.public.excel.programming)
  • Re: OLE Object- the real question
    ... Now you have a blank image control. ... Dim strFilename As String, strFind As String ... My file path for the 1st picture is ...
    (microsoft.public.access.forms)