How to disable ctrl + mousewheel zoom in a console Application - c#

I'm currently writing a console application with some custom console GUI and want to use ctrl, shft and alt when using the mousewheel to increment a number. However since Windows 10 you can use ctrl + mousewheel to zoom in/out the entire console window. I'm working in .Net 6.0 and don't mind using c++ or any pinvoke's even if it just works for windows machines. It needs to be solved programmatically however, so playing with OS settings or using Autohotkey is not an option for me. I did try to look up solutions on google/stackoverflow and as far as I understand globalkeyhooks seem to my best bet, however every article is either outdated or .Net Framework specific. If someone knows a link to an article with the information im looking for, I am more than happy to read through it myself to save the trouble. Thanks in advance
Failed attempts to write a globalkeyhook after searching through countless articles

Related

Which Browser for a Touch-Enabled WPF Application?

I looked at this thread here searching for a Web Browser to embed into a touch-enabled WPF application (on Windows 8 or 10).
I need to support manipulations (meaning be able to zoom, pane, rotate with touch events).
If possible, I would like also to support one of the game frameworks being either Adobe Flash, Unity or Web GL. Or a really working HTML 5 support with touch events.
Investigations performed so far:
- I have tried Awesomium, but I have too many issues with it. I created two questions on their forums two months ago and still don't have any reply.
Also, I tried CEF, but it crashes when the main application is stopped. Also, it does NOT support touch events.
Obviously, I also tried the default WebBrowser, but this one is an ActiveX control so it does not support manipulations.
So, I am about to test dotnetbrowser and EO.WebBrowser. Both require licenses which is less attractive to me but anyway if this the only way to go.
However, none of these browser implementations describe if they support a touch
interface.
Do you have any input on this issue?
Thanks a lot for your help
Best regards
Christophe
Finally I made it work by using a wrapper above CEF called Xilium.CEFGlue.
I could dive into the source code and add the touch support myself.
It works pretty well.
Thanks a lot for your help.
Christophe

Handle events from multiple mouses on the same PC on Win7 or newer

So far, the best language that I have known for this case is C# but I'd love to know if other languages can do it. I need to plug multiple mouses to the computer and handle their events separately.
for example:
Mouse1.MouseDragged() will move the cursor.
Mouse2.MouseDragged() will make a sound or print something and NOT do what Mouse1.MouseDragged() does.
I know there is a Microsoft Multipoint SDK but I cannot seem to make it work.
The rest of the applications out there for Multiple Mouses are for WinXP so I cant make them work.
Any suggestions? thanks.
After a very long research i found my solution thanks to Hans Passant comment.
What i did was creating a small Win32 App in Visual Studio to catch raw input from Mouse and Keyboard using Windows.h and i simply make it send keystrokes whenever i drag a specific mouse.
i still need to solve many problems, but so far it works.
Thanks a lot

Hide/Disable Start Button in Windows 8.1

I've searched a lot these days to find a way to programmatically hide or disable the start button in Windows 8.1, but could not find any useful information
Is there any way to do this? Either with C# or with some registry-keys...
A short explanation why I need to hide the button:
We have a .NET Desktop Application which runs on WinXP, Vista and 7 in a self-made kiosk mode. Now we have to get it running in Win8 (8.1) but as expected, the new Start-Menu (Metro, Modern UI, whatever you call it) is always there.
I already managed to disable the Hot Corners, but the Start Button in the left corner still appears when you move you mouse over it, and it also starts the Metro - what we don't want.
Any help would be appreciated!
It seems that there is no such way...
But you could use a third party tool like one of these http://lifehacker.com/how-can-i-hide-the-start-button-in-windows-8-1-1478012124.
This question belongs on SuperUser, since it's not code related, but I'll have a go at it.. You should create a system account with an assigned access. Here, read these two articles: first second
According to these articles, it shouldn't take you more than 5 minutes to achieve what you want.
... find a way to programmatically hide or disable the start button in Windows 8.1...
See Registry Key Controlling Start Button in Windows 8.1? on SuperUser. According to one commentor, there is no simple fix like a registry key. Tools like 7+ Taskbar Tweaker inject a DLL into explorer hook/subclass/redirect some of its methods.
If you are going to write your own DLL and inject it into Explorer, then you might want to take a look at Microsoft's Detours Library. I've used it in the past and its actually easy to use. The description from the website: Detours intercepts Win32 functions by re-writing the in-memory code for target functions. The Detours package also contains utilities to attach arbitrary DLLs and data segments to any Win32 binary.

Touch Keyboard in .NET Compact Framework

I browsed the web for a simplified keyboard for a project running on windows mobile, but I could not find anything good, so I tried to create one myself.
The basic problem encountered, related to which control use to realize the "keys", was: I need a control that:
- is clickable
- can contain text
- DOES NOT TAKE THE FOCUS
I made some attempt, and I found that the LinkLabel seems to be exactly what I need: it works.
Now, the question is: is that a good idea to use the LinkLabel to realize a touch screen keyboard, or this is the wrong approach?
I would like to avoid developing all the application with this keyboard, and then find some trouble when it will be "too late".
Honestly the "right" approach is to create an actual SIP (there's a sample in the WinMo SDK). Anything else and you have to deal with the focus issues you're already seeing.

How to simulate keyboard input in ALL applications?

I'm writing an app (in C#) which as a part of it must simulate and send some key strokes to another application. I'm using http://inputsimulator.codeplex.com/ project for simulating keys, and it works in many applications, but in some it doesn't - i.e. Mortal Combat 4.
I've googled about it, and found many answers varying from 'it's impossible' to 'you must use XXX library' etc. Those answered scared me a lot, and even nearly convinced I'm not able to do it at that time, BUT...
M$ Virtual Keyboard works. It works in ALL applications. So it IS possible... Does anyone of you, clever guys, know how can I achieve this?
Ok, I think I finally got it to work. I used API Monitor recommended by Neal P and it showed just minimal differences between OSK calls and mine. A bit later I've tried to make my calling thread sleep some time between sending messages with press and release key and that was it.
Although you were able to achieve your purpose, the way you achieved it does not fundamentally answer your question: How to simulate keyboard input in ALL applications?
There's a bunch of situations where the common user mode Microsoft API already mentioned does not work, like game applications that use the DirectInput API or protected games.
I have built a library that can help in this situations, it provides a simple C API that internally communicates with device filter drivers. It is able to send input for DirectInput based games and also is able to bypass some game protections. I have checked and it is still able to bypass some known game protections by using the x64 version of the library. Game protections commonly hook only the x86 system's api. Well, at last now, 18 February 2012, this is what I'm seeing happening.
Take a look at SendKeys on MSDN

Categories