PictureBox with scrollbars 
Author Message
 PictureBox with scrollbars

Hi there,

Can someone direct me to someplace or someone that has an ActiveX
control to view images (gifs, bmps, jpegs, etc). I'm using PictureBox
now but I need something with extended features such as (VERY IMPORTANT)
scrollbars (if the image is bigger than the control). I would prefer a
control that has basically the same functionality (methods and
properties) than the PictureBox, but if that's not possible, I can
settle for other controls. I also prefer Shareware or Freeware but I am
also prepared to buy controls from Third Party vendors.

Thanks for taking the time to read this.

Cheers from Portugal,

Jo?o Maia



Tue, 12 Dec 2000 03:00:00 GMT  
 PictureBox with scrollbars

Just add the Scrollbars to the Picturebox your selft... just use
setwindowlong and add Ws_Vscroll or Ws_Hscroll and there you have it...
yes... and a little subclassing is required... not very much though



Tue, 12 Dec 2000 03:00:00 GMT  
 PictureBox with scrollbars

Joao,
   If you would prefer to avoid subclassing, then check out article
Q140878 ("How to Create a Scrollable Viewport") in the Knowledge Base.
It's very simple.
-Dave

Quote:

> Hi there,

> Can someone direct me to someplace or someone that has an ActiveX
> control to view images (gifs, bmps, jpegs, etc). I'm using PictureBox
> now but I need something with extended features such as (VERY IMPORTANT)
> scrollbars (if the image is bigger than the control). I would prefer a
> control that has basically the same functionality (methods and
> properties) than the PictureBox, but if that's not possible, I can
> settle for other controls. I also prefer Shareware or Freeware but I am
> also prepared to buy controls from Third Party vendors.

> Thanks for taking the time to read this.

> Cheers from Portugal,

> Jo?o Maia



Tue, 12 Dec 2000 03:00:00 GMT  
 PictureBox with scrollbars

go to http://www.microsoft.com/vbasic/techmat/feature/apr98/



Wed, 13 Dec 2000 03:00:00 GMT  
 PictureBox with scrollbars

Hi,
Try the ImagN' Active X.  More speed and features. There is info and a
trial version here:  http://www.pegasustools.com/
Good luck,
jack
--
  |   Check out "BETTER JPEG" live: http://www.jpegwizard.com/   |
  |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
  | Jack Berlin - Pegasus Imaging Corp - the BETTER JPEG people! |

  |--------------------------------------------------------------|

Quote:

> Hi there,

> Can someone direct me to someplace or someone that has an ActiveX
> control to view images (gifs, bmps, jpegs, etc). I'm using PictureBox
> now but I need something with extended features such as (VERY IMPORTANT)
> scrollbars (if the image is bigger than the control). I would prefer a
> control that has basically the same functionality (methods and
> properties) than the PictureBox, but if that's not possible, I can
> settle for other controls. I also prefer Shareware or Freeware but I am
> also prepared to buy controls from Third Party vendors.

> Thanks for taking the time to read this.

> Cheers from Portugal,

> Jo?o Maia



Sun, 17 Dec 2000 03:00:00 GMT  
 PictureBox with scrollbars

Quote:

>Just add the Scrollbars to the Picturebox your selft... just use
>setwindowlong and add Ws_Vscroll or Ws_Hscroll and there you have it...
>yes... and a little subclassing is required... not very much though

I've never done any subclassing before. But I decided to try this
suggestion, but I can't seem to get it to work. You know how it is, if one
little thing isn't just right it won't work. If it is that simple, please
post the code it takes to  add the scroll bars to a picturebox.

Thank you very much!

RM



Sun, 24 Dec 2000 03:00:00 GMT  
 PictureBox with scrollbars
I've been working on this also....

You need to use GetWindowLong to get the WS_STYLE for the picturebox
Then you need to OR that value with WS_VSCROLL or WS_HSCROLL or both
depending on what you want.
Then use SendWindowLong and the scrollbars will appear.

The scrollbars aren't functional though,  that I am working on right now...

Robert Harned

Quote:


>>Just add the Scrollbars to the Picturebox your selft... just use
>>setwindowlong and add Ws_Vscroll or Ws_Hscroll and there you have it...
>>yes... and a little subclassing is required... not very much though

>I've never done any subclassing before. But I decided to try this
>suggestion, but I can't seem to get it to work. You know how it is, if one
>little thing isn't just right it won't work. If it is that simple, please
>post the code it takes to  add the scroll bars to a picturebox.

>Thank you very much!

>RM



Sun, 24 Dec 2000 03:00:00 GMT  
 PictureBox with scrollbars

Quote:
>Just add the Scrollbars to the Picturebox your selft... just use
>setwindowlong and add Ws_Vscroll or Ws_Hscroll and there you have it...
>yes... and a little subclassing is required... not very much though

???!!!

And just what is the picturebox scrolling?  Considering you are assigning
the image to the device context of the picturebox, which is limited to the
size of that control, I can't see how adding a scrollbar through API will
provide any functionality.... you can't scroll the device context.

If you add a picturebox *insider* the base pixbox, size it larger than the
base pixbox, then add scrollbars to reposition the inner pixbox within the
base pixbox, that's a different story.  This technique is explained in the
MSKB article on creating a scrollable viewport.

--

Randy Birch, MVP Visual Basic

VBnet, The Visual Basic Developers Resource Centre
http://www.mvps.org/vbnet

Common Controls Replacement Project Member
http://www.mvps.org/ccrp



Sun, 24 Dec 2000 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. help: picturebox with scrollbars???

2. Help Needed for Picturebox and Scrollbars

3. picturebox and scrollbars ?

4. PictureBox with ScrollBars?

5. picturebox and scrollbars

6. Picturebox - scrollbars

7. Add ScrollBars to a PictureBox

8. How can I associate scrollbars to a picturebox

9. Want Scrollbars for your PictureBoxes?

10. Want Scrollbars for your PictureBoxes?

11. add scrollbars to picturebox

12. Printing ALL content in large PictureBox which has scrollbars

 

 
Powered by phpBB® Forum Software