Solved

Changing Max and Min of a scroll bar  from another program

Posted on 1998-09-21
5
173 Views
Last Modified: 2013-12-03
How can i change the max and min property of a Horizontal or Vertical scroll bar of a program with another program?

example: like using SendMessage API to send keystrokes to another program.
0
Comment
Question by:NinJa
  • 4
5 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 100 total points
ID: 1414625
Use SMB_SETRANGE message.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1414626
You can also use the SMB_SETSCROLLINFO and SMB_GETSCROLLINFO messages.  These allow you te get/set more options than just the ends of the range.  

Note these messages (including SMB_SETRANGE) only work with scrollbar controls, they won't work with the vertical and horizontal "standard scrollbars" associated with a window.  (Just with scrollbar controls inside a window).

If you want to work with a window's "standard scrollbar", you can use the SetScrollInfo() and GetScrollInfo() functions.  
0
 
LVL 22

Expert Comment

by:nietod
ID: 1414627
By the way.  Doing this to another application's window could have undesirable effects.  Some programs may assume that these values are certain ranges and may crash or produce weird behaviors when you change them without their "knowing" about it.
0
 
LVL 8

Expert Comment

by:Answers2000
ID: 1414628
>>Use SMB_SETRANGE message.

Surely you mean SBM_SETRANGE !
0
 
LVL 22

Expert Comment

by:nietod
ID: 1414629
Yes, and stop calling me Shirley  : - )

(It stands for Scroll Bar Message.)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now