C# .NET Trackball Support - But Not As a Mouse! - c#

I want to use a trackball in my C# .NET application. But I do not want the trackball to be used by Windows as a mouse. When I connect both a trackball and a mouse the are both given control of the cursor.
So there are essentially two questions:
How can the trackball be removed/disabled/coaxed into giving up control of the cursor?
After doing this how can I access the trackball movement information from my C# .NET application.
Thank you!!
Ash
PS: I specifically want trackball support, but am hoping that joystick support will be similar as I may expand to this functionality in the future. Since the joystick does not default to having control of the cursor I can see how this may be different...perhaps easier?

I would think you need to install a special driver that would not identify the mouse as a mouse, but as an input device that streams the movement.
The windows driver kit might help. It says they have a HID device example.

I highly recommend Edward Tse's SDG Toolkit (Single Desktop Groupware Toolkit). I used it several years ago for an application that required multiple mice and monitors.
You can also get the C# source code: http://grouplab.cpsc.ucalgary.ca/cookbook/index.php/Toolkits/SDGSourceCode

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

Windows 8 Desktop multitouch API

I'm developing a c# touch application for windows 8, desktop mode, and i'm unable to find the best approach to do it. My question is: Should I use the existent Windows 7 Touch API c# or there is a new multitouch c# API that can be used to develop windows 8 desktops apps?
I know that windows 8 have legacy support for the win7 touch api, just need some insight and feedback if still is the best and only way to do it.
Does anyone had a previous experience with this problem?
Edited: I found this article: http://software.intel.com/en-us/articles/touch-gestures , basically the UIElement exposes methods that enable touch manipulation. Maybe this is the way to go. Any thoughts?
Thank you.
Windows 8 API has a new API based on WM_POINTER message see http://msdn.microsoft.com/en-us/library/hh454916(v=vs.85).aspx
Windows 7 API has some drawbacks, see http://the-witness.net/news/2012/10/wm_touch-is-totally-bananas/
WM_TOUCHxxx messages are not prone to this problem:
http://social.msdn.microsoft.com/Forums/en-US/ce6d630a-b345-46ac-88ef-773704986d62/touch-responsiveness-issue-how-to-resolve-jagged-nonsmooth-lines?forum=winappswithcsharp
Both the WM_TOUCHxxx and WM_POINTERxxx message will be prone this this problem:
https://web.archive.org/web/20150709083602/https://connect.microsoft.com/VisualStudio/feedback/details/903760/wpf-touch-services-are-badly-broken
If your c# desktop application is using WPF, your only viable option is to implement your own TOUCHDEVICE that fixes these underlying issues, since it appears Microsoft has decided WPF touch is no longer important.
It depends on what actually are your needs in your app.
If you only want new fast ways to rotate and zoom objects, maybe the WPF Manipulation API is all you need.
If, however, you need to handle multiple fingers on your GUI independently, or in a custom way, you simply handle the usual OnTouchDown, OnTouchMove, and other events.
Please note that, however, multi-touch is only available from inside a single window. In other words: you can multi-touch two objects on the same window, but you won't be able to multi-touch two objects that reside on different windows. If you want multi-touch, multi-window funcionality, you need to:
Use .NET 4.7
Change some configuration in your WPF app

A way to combine Adobe AIR with .NET?

I was wondering if there is a possibility to combine an AIR application with a WinForms Application?
Example
I've made some nice animated loading screens / splash screens with Adobe AIR and i want to use them with an .NET program, is that possible?
I don't want to simply call the program executable file (program.exe) within Adobe AIR (Air.exe). I want to use the textfields inside air, and as I click on Submit, I want AIR to pass the information to the .NET C# form and do stuff with that.
What is the proper way to do so, or what are alternative ways? (using WPF to embed a flash (SWF) inside .NET)
Based on the content posted in this tutorial, I think that it's possible to use .NET with Adobe AIR yet I'm not really sure.
You might also like to take a look at this which shows how to use CommandProxy to integrate AIR and .NET
Thanks,
I hope you find this helpful :)

Developing a custom keyboard (like Swype) for Windows Phone 7.1 Mango

Having recently bought a Windows Phone I can say the one feature I sorely miss from my Android phone is Swype. This was a custom keyboard where you trace your finger over the keyboard to create words. Its very fast and basically I think its awesome.
Anyway! There is no Swype on WP7... The reason for this I hear is because it is impossible to change the keyboard programmatically in Windows phone. I would like to know from the community if things have changed or are likely to change in this area, or if there are any workarounds to programmatically inject a custom keyboard into the UI to allow input with any text field.
Disclosure - if it becomes possible I would like to develop a swype like app, however it would likely be because I miss it so much rather than as a commercial project!
Best regards,
There is no way to officially create a new keyboard that functions outside of your app. So, if you plan to release this in the marketplace, then it's not currently possible. You might be able to create a homebrew app that does this, but I don't think it would be very easy to replace the standard keyboard system wide. Of course, even if you did manage the homebrew version, it definitely wouldn't be allowed on the Marketplace.
You're limited by what Microsoft allows you to alter and they don't allow you to alter the keyboard. Furthermore Swype is a patented and very advanced technology that would be a humongous project for a single developer to work one. It's a good idea as lots of people like Swype but WP7 isn't Android.

Microsoft Based Touch/Stylus Input

Disclaimer:It's my first time developing an app that will be on a tablet style pc.
The app needs to allow a user to write notes with either a tablet pen or by touch. This must be a .net app and may be on either Windows XP and/or Windows 7. I am mainly tasked with capturing written notes from the user interface, but I am sure I will be working on other aspects of the app.
I have looked into Digital Ink and it seems the way to go, but I am unsure of how much support currently exists for windows 7 and how much support there is going to be for this technology in the future.
My questions:
Am I going in the right direction, and if not...is there something that would allow me to better accommodate this type of user input?
Does any one have other tips or good reference sites with good info on microsoft based touch and/or tablet stylus input.
If you plan on doing custom programming, you can check out the Windows Touch API for Windows 7.
Touch and Digital Ink both use C# and .NET framework, so I would imagine there is a considerable amount of support for Digital Ink in Windows 7.
Also, in the .NET framework, there's a Stylus class that tracks stylus coordinates in a text box, even if the stylus leaves the box and comes back in:
System.Windows.Input.Stylus
Hope this helps!
Microsoft also provides the RealTimeStylus API, see this tutorial.

Categories