[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.vb.general.discussion

Alternative scrollbar option for moving a picturebox left <> right

Mojo

2/15/2011 9:36:00 PM

Hi All

I've been a good lad and when my vb6 app was limited for space I created a
picturebox within a picturebox and then used the standard scrollbar to move
the picturebox contents left and right. This is fine and it's functional,
but the standard vb6 scrollbar looks a bit tired and amateurish, as my form
design looks completely diff to the grey Win98 look of the scrollbar.

I've tried putting some nice slim left/right arrows at each side of the
picture to give the same scrollie effect, but my code doesn't seem to give a
fluid experience/control. You basically have to frantically keep clicking
the left (or right) arrow to make it go left (or right) and it just doesn't
work.

Has anybody got any suggestions on how I could make my arrow clicking a
fluid process, I envisaged that they'd just hold the mouse down to make it
move left or right, but how do you invoke this in code OR a better looking
scrollbar offering??

Thank you in advance.


3 Answers

Henning

2/15/2011 11:34:00 PM

0


"Mojo" <please@dont.spam.com> skrev i meddelandet
news:KdudnbQRkYpcbMfQnZ2dnUVZ8kGdnZ2d@brightview.co.uk...
> Hi All
>
> I've been a good lad and when my vb6 app was limited for space I created a
> picturebox within a picturebox and then used the standard scrollbar to
> move
> the picturebox contents left and right. This is fine and it's functional,
> but the standard vb6 scrollbar looks a bit tired and amateurish, as my
> form
> design looks completely diff to the grey Win98 look of the scrollbar.
>
> I've tried putting some nice slim left/right arrows at each side of the
> picture to give the same scrollie effect, but my code doesn't seem to give
> a
> fluid experience/control. You basically have to frantically keep clicking
> the left (or right) arrow to make it go left (or right) and it just
> doesn't
> work.
>
> Has anybody got any suggestions on how I could make my arrow clicking a
> fluid process, I envisaged that they'd just hold the mouse down to make it
> move left or right, but how do you invoke this in code OR a better looking
> scrollbar offering??
>
> Thank you in advance.
>
>

Use Public variables for ScrollLeft As Boolean, ScrollRight As Boolean.

Use the Left- and Right Arrow controls' MouseDown and MouseUp events to
enable/disable scrolling in a Timer.

/Henning


Ivar

2/16/2011 12:18:00 AM

0

The easiest way to do this is to go on to sites like planet source code and
search for scrollbar, you will find quite a few suitable UserControls there.

Have fun

Ivar

DaveO

2/17/2011 4:41:00 PM

0


"Mojo" <please@dont.spam.com> wrote in message
news:KdudnbQRkYpcbMfQnZ2dnUVZ8kGdnZ2d@brightview.co.uk...
> Hi All
>
> I've been a good lad and when my vb6 app was limited for space I created a
> picturebox within a picturebox and then used the standard scrollbar to
> move
> the picturebox contents left and right. This is fine and it's functional,
> but the standard vb6 scrollbar looks a bit tired and amateurish, as my
> form
> design looks completely diff to the grey Win98 look of the scrollbar.
>
> I've tried putting some nice slim left/right arrows at each side of the
> picture to give the same scrollie effect, but my code doesn't seem to give
> a
> fluid experience/control. You basically have to frantically keep clicking
> the left (or right) arrow to make it go left (or right) and it just
> doesn't
> work.
>
> Has anybody got any suggestions on how I could make my arrow clicking a
> fluid process, I envisaged that they'd just hold the mouse down to make it
> move left or right, but how do you invoke this in code OR a better looking
> scrollbar offering??
>
> Thank you in advance.
>

Leave the scrollbar alone, use a manifest to make the whole program adopt
whatever Windows theming the user has enabled.
Alternatively or additionally allow the user to grab (click) the picture
with the mouse and drag it around the viewport.

DaveO.