Solved

Changing Max and Min of a scroll bar  from another program

Posted on 1998-09-21
5
179 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…

860 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