The "Default Zoom Level" Mouse Button - windows

Many mice and keyboards have "zoom" buttons on them. These almost always generate Ctrl+Mouse Wheel messages to the applications, so they are easily accounted for by us programmers.
But my current Logitech mouse has an additional feature. The zoom wheel indeed sends Ctrl+Mouse Wheel messages when scrolled (or, actually, tilted), but when I depress the zoom wheel, most programs restore the zoom level to the default, i.e. 100 %. What kind of message does the mouse send to the application in this case? I cannot find a suitable virtual key code for it.
I should probably say that I have tried to capture this event. In my Delphi application, I wrote handlers for the KeyDown, MouseDown, and MouseWheel events, but non of them are triggered by this mysterious button.
Applications that support this button:
Google Chrome 5.0.375.127
Microsoft Word 2010
Applications that seem not to support this button:
Microsoft WordPad in Windows 7
Microsoft Paint in Windows 7

There is no dedicated shortcut key-stroke or Windows message. Odds are pretty good that the mouse helper has specific awareness of the process that has the focus. And generates the specific command that this program needs to reset the zoom, possibly a WM_COMMAND message. Use a tool like Microsoft's Spy++ to see what messages are generated, if any.

I have a Logitech M570 and downloaded 'set point'.
Not all mice / trackballs have this feature, dead giveaway is having a 'forward / back' button on your mouse or trackball. If you can get 'set point', there are programmable button / wheel options.
find your mouse or trackball on their product page, then, > support > (your mouse), > downloads
If your device can use 'set point', see download button window on the left, insure your Windows version.
Select 'set point'
at the bottom of the window, hit download, go through wizard steps. Download may be fast or take a while.
If it looks like it successfully downloaded, > control panel > mouse. You will see 'mouse properties', look for set point tab.
Try programming 'ctrl' on your 'depress' mouse wheel or 'tilt' button.
I'm a writer, I love my M570 wireless trackball!

Related

How to prevent mouse click event on Windows

I record the mouse events on windows by using robotgo package. Package provides to get bitmap of clicked area but the latency of having bitmap is super sensitive situation here.
For example:
If I click any checkbox which is unchecked on the screen, provided bitmap must contains the state of unchecked but it provides me checked state and cannot simulate it with robotgo or cannot trigger click by using bitmap.
Solution to this scenario is that I need to prevent windows mouse click event until bitmap provided by the package (or adding some delay for click event) then trigger the click event on windows.
I made some research online but couldn't find a proper solution. How prevent click event on Windows in Go? Is it possible or is there any other way to make it happen?
A low-level mouse hook can eat mouse events. SendInput can generate mouse input events.
You would have to set a flag somewhere so you don't eat your own fake input events.
Keep in mind that SendInput is not perfect (can be detected by other hooks) and playing with the input system like this is usually not the best solution. Adding 500ms (or some other delay) to every mouse click is going to be very annoying for your users.
It is better to use UI Automation to get information about UI element states in other applications...

Visual studio smooth PageUp/PageDown?

I find the problem with PageUp/PageDown in Visual Studio (and in most editors for that matter) is that it navigates one complete page at a time, and does so instantly. Doing it multiple times you will eventually lose the notion of where you are in the code and lose track where you came from.
My questions:
Is there any way I could modify PageUp/PageDown to jump half a page?
Is there any way I could make PageUp/PageDown scroll 'smoothly' and not instantly? (think Lerp)
To my knowledge this doesn't exist out of the box, and I couldn't find any plugins to do it.
EDIT: I do NOT use the mouse when programming. Suggesting to use the mouse wheel or a 'touch screen' defeats the purpose of staying in the main row.
Here is my fork of the fork of SmoothScroll extension:
https://github.com/monoblaine/SmoothScroll
Preview
Configuration (only page scrolling)
Description
Normally, it supports scroolling the editor smoothly using Alt + Wheel but I don't use the mouse during coding, either. I use the numpad keys to send wheel events through AutoHotkey.
You can use the following script to send the keyboard & mouse event necessary to create a smooth page scroll using Alt + NumpadUp and Alt + NumpadClear hotkeys:
#IfWinActive ahk_exe devenv.exe
!NumpadUp::Send {Blind}{WheelUp}
!NumpadClear::Send {Blind}{WheelDown}
#IfWinActive

disable drag with touchscreen

Hi not a programmer but am looking for advice. This is about how touchscreens interact with windows.
In many touch drivers that are provided with touchscreens they come with the ability to set up certain types of mouse mode. For example click on touch, click on release as well as the normal click and drag. I would like to know if there is a way (may be with a registry modification) that will turn the normally supplied windows function of ‘click and drag’ (the bit that draws the blue box on the desktop) into a click on touch that ignores any mouse_move . This will mean I can click on buttons but not drag the cursor around.
Welcome any options.
Kev

Detect that the onscreen keyboard has been displayed on Windows Phone 7

Simple question:
How do I detect that the onscreen keyboard has been displayed on windows mobile 7? Is there an event I can add a listener to?
It takes up about half the screen and I want to scroll the view up when it gets displayed...
EDIT:
A comment below indicates more clearly what I'm trying to do: I have a textbox input, and as the user types into it an autocomplete dropdown appears below it (like google suggest). By default, the active control (the textbox) scrolls into view when focussed, and the onscreen keyboard is directly below it. The onscreen keyboard appears in front of my autocomplete dropdown - what I want to do is make the screen scroll a little further up, so there's some room for my dropdown to be shown.
The windows phone UI design guidelines say: "When the keyboard is deployed, the application should scroll to ensure the active edit control and the caret are in view". This happens fine, it's just the non-active dropdown gets hidden behind the onscreen keyboard.
The guidelines also say that an application can choose to show the onscreen keyboard, and can also choose to close it.
At the moment i'm stuck, and I don't think (based on my research and the replies to this question) that it's possible to detect that the onscreen keyboard has been displayed. I'm moving my investigation to see if it's possible to determine the "visible area" of the page (width & height in pixels for example), and combine this with an onfocus for the textbox... not sure if this will prove fruitful though.
Detecting when the virtual keyboard is displayed won't be possible in 7.0, as confirmed by Microsoft's Peter Torr in the WP7 forum on MSDN.
Maybe, as a dirty workaround, you could detect when the position of your text box (or its parent scroll viewer's offset) has changed, as this would indicate that the virtual keyboard has appeared or disappeared.
You can listen to the TextBox.GotFocus and TextBox.LostFocus events to detect when a text box in your application acquires and looses focus.
If an editable element gets focus then the framework will automatically scroll the element into view. So you really shouldn't have to do anything.

Non-modal notification bars?

How can I implement a non-modal sliding notification bar, such as Firefox, Beyond Compare, and VMware Workstation 6.5 use, in client-side Windows apps?
Any language or framework is fine for now; my current app is in Delphi / C++Builder, but I'm also interested in comparing frameworks and prototyping some UIs.
Related question: This question asks about doing so in Java.
Beyond Compare's notification bar doesn't slide, it just pops open, so I can't offer any help on that. The notification bar itself is just a TPanel with a TImage and TLabel for the image/text. It's placed on the main window at design time and it's set to align bottom. Normally it's hidden, and when there's a message to display we set the Visible property to true.
There's different ways to hide the notification, depending on how you want it to behave. In BC we install keyboard and mouse hooks (SetWindowsHookEx with WH_KEYBOARD or WH_MOUSE) and hide it on key up and mouse button events. Alternatively, like Mark said, you could hide it after a delay, add a close button to the side, or just watch for specific events in your app and manually hide it then.
In Delphi, I believe that you can change a property on the Dialog itself (change the window type away from "Dialog" and select the standard windowed alternative). Sorry I cannot be more specific, it has been about two years since I last worked on a Delphi app.

Resources