471,605 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

Scrollable Control Scroll Bars

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
Jan 24 '06 #1
4 2936
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.

Jan 24 '06 #2
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
Chris S. wrote:
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.

Jan 24 '06 #3
Can you post a snippet, I'm not sure I know what you mean

Jan 24 '06 #4
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

Chris S. wrote:
Can you post a snippet, I'm not sure I know what you mean

Jan 24 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Arlie Rahn | last post: by
reply views Thread by Geoff B via .NET 247 | last post: by
5 posts views Thread by Brian Henry | last post: by
reply views Thread by Paul Cheetham | last post: by
reply views Thread by Rune Jacobsen | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.