Scrollable Control Scroll Bars

P

Paul Cheetham

Hi,

I have created a control derived from a Scrollable control.

Can anyone tell me how I can get a reference to the scroll bars, so that
I can manipulate the positions in code?

If I enumerate the child controls they don't show, but there bust be a
way of accessing them.

This is causing me a major headache, and is now holding up my project.


Thankyou.


Paul Cheetham
 
C

Chris S.

Do you need a horizontal or vertical scrollbar? As it's probably best
to derive from HScrollBar and VScrollBar, depending on what you need.

Else take a look on MSDN for SetScrollPos() (user32.dll),SB_CTL as
there is a lot more available in the control than .NET gives you.
 
P

Paul Cheetham

It's a vertical scroll bar.

The Scrollable control generates these itself, and I can change the
position etc. if I can get a reference to it, but there doesn't appear
to be any way of getting a reference to the actual scroll bar control.

(I'm using VS2003 and .Net 1.1)


Thanks.

Paul
 
P

Paul Cheetham

Chris,

Thanks for your help.

The GetScrollInfo and SetScrollInfo functions worked great.
You don't need to reference the scroll bars directly using these, you
just need the window handle of the control.


Thanks again.

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top