setting up a scrollbar with picture control 
Author Message
 setting up a scrollbar with picture control

I am using a picture control to act as a print preview. I created a
device-independent print routine in which I pass the output object to the
routine, and the output is directed to that object. This is working great.
However, for the print preview when I print to a picture box, I can't seem to
figure out how to get the scrollbars to work so the user can view the entire
picture box.  I have tried for a couple of hours. It seems so simple, but I
can't get the code right.  If someone has done this (or you know how), can you
give me an idea of what I need to do, possibly a code snippet?  My picture box
is on a form with a toolbar (to navigate through the pages, print, and close
the form). Thank you for the help.


Sun, 01 Jul 2001 03:00:00 GMT  
 setting up a scrollbar with picture control
If I were attempting a print preview, I would hide one picture box
to hold the printed page (so it has an hDC) and assign that image to
an image control which is inside a displayed picture box.  The Image
control easily supports zooming (stretch property) and the if the
image is larger than what the picture box can display, scroll bars
(inside, or perhaps outside the picture box) can be used to move the
image control under user control.

If the zoom factor causes the image to be smaller than the picture box,
the scroll bars can be made invisible, and the image control can be
easily centered inside the picture box.  You may even get fancy and
add shadowing of image control by drawing directly on the displayed
picture box.

I haven't actually done this, but it seems to me, this is the way to
do it!

LFS

Quote:

> I am using a picture control to act as a print preview. I created a
> device-independent print routine in which I pass the output object to the
> routine, and the output is directed to that object. This is working great.
> However, for the print preview when I print to a picture box, I can't seem to
> figure out how to get the scrollbars to work so the user can view the entire
> picture box.  I have tried for a couple of hours. It seems so simple, but I
> can't get the code right.  If someone has done this (or you know how), can you
> give me an idea of what I need to do, possibly a code snippet?  My picture box
> is on a form with a toolbar (to navigate through the pages, print, and close
> the form). Thank you for the help.



Mon, 02 Jul 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ScrollBar in picture control

2. Setting Scrollbar size in WebBrowser control.

3. SET UPS: Please Stop... AND Lood

4. Scrollbar for picture

5. activex control for UPS shipping rates

6. control enumeration pop-ups at design time

7. HELP! Programatically setting picture in image control

8. Problem with StatusBar control setting Picture property

9. Setting Picture control's palette using API

10. how to set a picture control to an inmage from a Web Service

11. Copy a picture from a Picture Control in a Image Control

12. Set the Width and Height of Picture control

 

 
Powered by phpBB® Forum Software