Re: Problem copying Picturebox to Clipboard



Thanks for the reply Mike,

From your questions it's now obvious even to me that there's a lot I still
don't know about this. I do generally know the difference between width and
scale width. I'm not blonde you know :o) I don't really know how the
picture 'width' relates to anything. I'm guessing it's in pixels or...

I'll need to get back into this in depth and will post back here today or
tomorrow with more info.

Thanks, Jennifer.


"Mike Williams" <mikea@xxxxxxxxxxxxxxxxx> wrote in message
news:uy3fC6WgHHA.284@xxxxxxxxxxxxxxxxxxxxxxx
"Jennifer W" <jenniferw@xxxxxxxxxxxxxxx> wrote in message
news:%231$i06TgHHA.3368@xxxxxxxxxxxxxxxxxxxxxxx

in VB6, Winxp I'm printing to a picturebox and then copying that
to the clipboard. It's working pretty well except when I paste the
clipboard into a Word document, there's a large blank space at the
bottom of the picture I just pasted.

You need to explain *exactly* what it is you are trying to do, and you
need to show us your code that draws to the Picture Box. Your code is a
bit "iffy" at the moment because it does not take into account the
differences between different machines, but if you are running your
machine at the standard 96 dpi setting (which is very likely) and if you
have left the ScaleMode of the Form itself at its default seting of Twips
(which, looking at your specific Picture Box Height and Width values, is
extremely likely) and if your Picture Box has the standard borders then
your code currently creates a Picture Box such that the bitmap it contains
is 996 pixels wide by 1052 pixels wide (996 x 1052 pixel bitmap). That is
an almost (but not quite) square bitmap. Is that the size of the bitmap
you are trying to create?

And are you sure that your drawing code needs to be using a ScaleWidth of
18000 and a ScaleHeight of 8500? Those sizes bear no relation at all to
the aspect ratio of the bitmap. There's nothing wrong with doing that of
course if that's what you really want, but is that really what you want to
do? And does your drawing code take that into account?

And, do you actually know the difference between Width and ScaleWidth (and
Height and ScaleHeight), or the differences between machines which can
cause your bitmap to be a different size depending on which machine your
code is running on unless your code takes account of them? Do you know how
those things work? You need to explain *exactly* what it is you are trying
to do, and you need to show your code, including the drawing code.

Mike





.



Relevant Pages

  • Re: Problem copying Picturebox to Clipboard
    ... clipboard into a Word document, there's a large blank space at the ... to show us your code that draws to the Picture Box. ... Your code is a bit "iffy" at the moment because it does not take into account the differences between different machines, but if you are running your machine at the standard 96 dpi setting and if you have left the ScaleMode of the Form itself at its default seting of Twips and if your Picture Box has the standard borders then your code currently creates a Picture Box such that the bitmap it contains is 996 pixels wide by ... And, do you actually know the difference between Width and ScaleWidth, or the differences between machines which can cause your bitmap to be a different size depending on which machine your code is running on unless your code takes account of them? ...
    (microsoft.public.vb.general.discussion)
  • Re: Graph Plotting - Mike
    ... it with Autoredraw set to True and also with a picture loaded into its ... Then we created a device context using the CreatCompatibleDC API. ... draw into that bitmap or when we want to "blit" it somewhere (pens, brushes, ... machines that are currenty running at full colour depth (which is most ...
    (comp.lang.basic.visual.misc)
  • Re: Zoom in/ Zoom out images
    ... Picture control in the same dialog. ... As soon as you leave this function the destructor is called and the bitmap object is ... The drawing must be done in the OnPaint handler. ...
    (microsoft.public.vc.mfc)
  • Re: One Thing I Noticed - Line Too Long
    ... > that creating a VB Autoredraw picture box automatically creates a separate ... > because you said it uses too much memory because it creates two bitmaps. ... > create an otherwise non existent bitmap in video card memory! ...
    (microsoft.public.vb.general.discussion)
  • Re: Graph Plotting - Mike
    ... the main picture box?". ... creates contains a bitmap and all of the details as to how Windows is to ... The device context that it creates is compatible with the device you ... in memory that contains the 'attribute'. ...
    (comp.lang.basic.visual.misc)