Display text on window media player or monitor - c#

I would like to display text like my company name on the window media player. I use DrawString function on Form onPaint event but it is covered by the window media player.
I also use Label control but it display square block on the player control even i set the back color to transparent. I develop KTV system it has two monitor one has form controls and another has player. Please advice me how should I do.

If your talking about the windows built-in media player then your going to have to get down and dirty with the Win32 API's, windows hooks, HWND, etc. You can't just paint a control on the window. What your talking about is some very low level windows coding.
Take a look at Spy++ (http://msdn.microsoft.com/en-us/magazine/cc163617.aspx). It's a tool from Microsoft that let's you delve into the details of a running application. It has a component called ManagedSpyLib which wraps the C++ windows libraries in a managed library to make the windows hooks calls easier. Be ready to learn more about the OS than you ever wanted to know. :-)

Related

Extending volume controls on volume change in Windows 10 (similar to Spotify on Windows)

I'm new to C# and programming applications on Windows.
My goal is to achieve an effect similar to the Spotify application as seen here. More specifically, when the volume changes or a volume key is pressed I want to display a window with configurable UI elements.
After playing around with Spotify it seems as though the application is hooking into a Windows library to customize the volume display. I believe this because it reacts to mouse over events in a similar way to the volume controls (ex, mousing over spotify overlay will keep the volume overlay visible and vise-a-versa).
What would the high level approach be to achieving this type of UI element in Windows 10 (I don't care about other devices)? My current approach involves triggering a Form display when a system volume change occurs.

Using Windows Media Player with Windows Store App C++

I know it is somehow possible to implement a windows media player in a form with Visual C#.
The info for that is here: How to add the libraries and here How to code it.
But my project is in Visual C++ and I'm having a hard time finding how to do the same. It is a windows store application based on an example from a Hearth Rate Bluetooth monitor.
My goal is to play a video while the data acquisition occurs.
The answer is Windows Store App can't handle ActiveX controls. At least in a straightforward way.
The solution was to implement a MediaElement from the Toolbox into the XAML page. That element is easy to use with mediaElement.Play() and mediaElement.SetSource()

Kinect for Windows v2 hand cursor outside WPF windows

I would like to write an application where you can use your hand instead of mouse. I wrote some WPF and use a hand style and it work good.
But I want to use this control outside and WPF window, just like normal mouse coursor. Is it possible to write it with Kinect For Windows V2 ?
What you need is a service, but not WPF app. So that it still can process input from Kinect in background, not only when your app is active and foreground.
You need to emit mouse move/click events in order to use it globally in the whole Windows OS. Here is one of examples on MSDN: https://social.msdn.microsoft.com/Forums/vstudio/en-US/1ea09f18-94f6-4f4f-bcba-d02da27beaa4/control-mouse-position-and-generate-click-from-program-c-winforms-aim-control-pc-from-serial?forum=csharpgeneral

Access Windows Media Player buttons programmatically

I'm making a C# windows application, in which I've embedded a Windows Media Player in my form.
Now, instead of using the player in a normal way, I want to access its buttons, for e.g I want to hide its "Play" & "Pause" button.
In short, I want to customize the player according to my needs.
How can I do so?
You will have to hook the creation of the app. Mainly the windows mesaage WM Create or WM Paint.
There You have to check which window names the corresponding controls have. There are several tools to examine such things during runtime, which all use the windows hooking mechanism. However, I think this will fail for metro apps. You must read about hooks . Check codeproject.com for that, because You also will need to create at least one dll. And there is a good example in c, which surely can be ported to c#.Can I give You furthrer info?

Creating a Windows Game Overlay Application?

After playing quite a bit of Bad Company 2 over the last month, I'm getting kind of tired of Alt+Tabbing out of my game to change the song on iTunes. I've got a fairly good iTunes controller library already built for a previous project I was working on, and I'd like to create a WPF application mimicking the BC2 UI that would overlay the game when pressing a shortcut key, much the same way as the Steam Community overlay.
The only problem I foresee is getting my application to overlay BC2 when the user presses a specified shortcut key in-game. Is there a way to intercept a keypress from BC2 (or, really, any Win32 application) and use it to bring my app to the foreground?
In order to have a global keyboard shortcut, you need to use a Hook.
Here is a tutorial showing how to do Keyboard Hooks in C#.
That being said, doing the overlay may be difficult, depending on how the game is written. Many full screen games cannot (easily) have other programs run in front of them. I'd play with making sure that works correctly in your specific game first.

Categories