StrokesPlus.net Forum
»
General Discussion
»
General Discussion
»
Is there a good way to horizontal stroll except holding the right button+stroll?
Rank: Advanced Member
Groups: Moderators, Approved Joined: 4/23/2020(UTC) Posts: 161 Thanks: 46 times Was thanked: 23 time(s) in 17 post(s)
|
I try to use holding the left button with a stroll to achieve a horizontal stroll, but it seems not possible to change the stroke button temporarily through I search for the information from the forum. I set the right button+stroll to other actions in the browser. I have no good idea to achieve a horizontal stroll. Please give me some suggestions. The following code to stroll horizontally seems not convenient. The navigation bar moves to the left when I stroll down, it moves to the right when strolling up, and it may be better if change the direction. Code:
sp.MouseWheel(wheel.Point, true, wheel.Delta);
|
|
|
|
Rank: Advanced Member
Groups: Moderators, Approved Joined: 4/23/2020(UTC) Posts: 161 Thanks: 46 times Was thanked: 23 time(s) in 17 post(s)
|
I find to hold a key like SPACE+stroll can achieve it, but it is not a perfect way for I need to press the key on the keyboard. If you have a better way, please to tell me. Code:var mouseLocation = sp.GetCurrentMousePoint();
var currentScreen = Screen.FromPoint(mouseLocation);
if(mouseLocation.Y >= currentScreen.Bounds.Bottom - 40) {
if(wheel.Delta > 0) {
} else {
}
} else if(mouseLocation.Y <= currentScreen.Bounds.Top + 35) {
if(wheel.Delta > 0) {
} else {
}
} else if(mouseLocation.X <= currentScreen.Bounds.Left + 20) {
if(wheel.Delta > 0){
} else {
}
} else if(mouseLocation.X >= currentScreen.Bounds.Right - 25) {
if(wheel.Delta > 0) {
} else {
}
} else {
//Default, pass mouse wheel message onto the original control
var isSpaceDown = sp.GetKeyState(vk.SPACE) & 0x8000
if(isSpaceDown) {
//horizontal stroll
sp.MouseWheel(wheel.Point, true, wheel.Delta);
} else {
//vertical stroll
sp.MouseWheel(wheel.Point, false, wheel.Delta);
}
}
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Quote:it seems not possible to change the stroke button temporarily through I search for the information from the forum. Code://Change Stroke button
sp_config.StrokeButton = MouseButtons.Right;
//Change secondary stroke button
sp_config.SecondaryStrokeButton = MouseButtons.Left;
Can specify Left, Middle, Right, X1, or X2 - the change happens immediately. Does that help?
|
|
|
|
Rank: Advanced Member
Groups: Moderators, Approved Joined: 4/23/2020(UTC) Posts: 161 Thanks: 46 times Was thanked: 23 time(s) in 17 post(s)
|
Originally Posted by: Rob Quote:it seems not possible to change the stroke button temporarily through I search for the information from the forum. Code://Change Stroke button
sp_config.StrokeButton = MouseButtons.Right;
//Change secondary stroke button
sp_config.SecondaryStrokeButton = MouseButtons.Left;
Can specify Left, Middle, Right, X1, or X2 - the change happens immediately. Does that help? Emmm, I get it, it seems that it is better to change the stroke in a specific program. I just want to horizontal stroll when the mouse is in the horizontal area, so as the vertical stroll. Thanks, Rob. Never mind it, it rarely happens and I change to the normal way. But can the navigation bar moves to the right when I stroll down and moves left when strolling up?
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Quote:But can the navigation bar moves to the right when I stroll down and moves left when strolling up? This will be very difficult to accomplish, with native controls (like Notepad), you can capture the mouse and use WM_NCHITTEST to detect if the mouse is above a horizontal scroll ( HTHSCROLL). But for non-native controls (like Chrome), this likely will not work.
|
|
|
|
Rank: Advanced Member
Groups: Moderators, Approved Joined: 4/23/2020(UTC) Posts: 161 Thanks: 46 times Was thanked: 23 time(s) in 17 post(s)
|
Originally Posted by: Rob Quote:But can the navigation bar moves to the right when I stroll down and moves left when strolling up? This will be very difficult to accomplish, with native controls (like Notepad), you can capture the mouse and use WM_NCHITTEST to detect if the mouse is above a horizontal scroll ( HTHSCROLL). But for non-native controls (like Chrome), this likely will not work. It is such a confusing thing, and I can define it as one of the strange behaviors of Microsoft on Win10 now. At the same time, it is interesting for the native controls, for this is common on Mac OS.
|
|
|
|
StrokesPlus.net Forum
»
General Discussion
»
General Discussion
»
Is there a good way to horizontal stroll except holding the right button+stroll?
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close