Solved

Changing Max and Min of a scroll bar  from another program

Posted on 1998-09-21
5
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Changing the installation path of this MSI 5 113
Best way to accomplish this task? 3 93
Problem to file 3 92
C# LINQ ForEach() question 6 79
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 …
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

756 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