473,408 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 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 2975
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Arlie Rahn | last post by:
I would like to ad a custom scroll bar control to my app that has a customizable and "flat" look to it (not the normal VB look). Does anyone have any ideas on where to find a good one?
0
by: Phill | last post by:
I have a scrollable control I'm working on. Some parts of the painting I want to always be in the same position like my border. But when I hit the scroll bars my border moves. I dont't understand...
0
by: Geoff B via .NET 247 | last post by:
I have a form that displays images using a picturebox. Theseimages are usually too large to fit in the entire screen so iwould like to panel to be scrollable with the mouse. On my form I have 2...
5
by: sara | last post by:
I haven't been able to find this answer in previous posts; I have a form, with a subform that is displayed in datasheet view, and one field "Item Description" could be from very few to many...
5
by: Brian Henry | last post by:
Hello, I want to make a control that has a scrollable Gantt type display (not really one but will look similar to one) this is going to be custom drawn (i already have the drawing procedure...
0
by: Paul Cheetham | last post by:
Hi, I have a custom control which is a descendant of ScrollableControl. I have everything working fine, except I want to be able to adjust the scroll position in code. I have created some...
1
by: Rune Jacobsen | last post by:
Hi, Since noone replied to my other post, I have simplified my spec a bit in the hope that I can adequately explain what I am trying to achieve. For those interested, I have created a mockup...
0
by: Rune Jacobsen | last post by:
Hi all, In my project I have a control (described in an earlier post) which basically consists of three "subcontrols": One big area where the vital data is displayed (scrollable, since it will...
4
by: crazychrisy54 | last post by:
Hi there, I am new to JavaScript and wonder if it could be used to solve my problem, any help would be much appreciated! I have a html web page which contains a table on the left hand side and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.