Solved

Changing Max and Min of a scroll bar  from another program

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

920 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

16 Experts available now in Live!

Get 1:1 Help Now