Is it possible to send virtual key code from Windows Runtime Component authored in C++/WinRT? - c++-winrt

I am developing a Windows Runtime Component which handles on-SoC GPIO buttons by using Windows.Devices.Gpio.
While the button is pressed, I need to send relative virtual key code.
However, the SendInput() function is not available for a Windows Runtime Component.
Is there any other way to do that?

Related

.NET Web Browser Control Emulation on Windows 10

I have made a personal app using VB. The app uses Webbrowser control to load modern site so I edited my registry to have my app use Windows 8.1 IE browser instead of ActiveX browser built in with VB.
The registry edit I made was,
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"APPLICATION.exe"=dword:00000000
This worked fine with the application until I upgrade it to Windows 10. Now the application won't load the browser if I have the key and when I delete it, it uses the default ActiveX control which doesn't support many things. Is there any way to make it work ? IE is still there on Windows 10 but I am guessing Edge is the problem ?
The dword value should be 11000 in decimal, so the WebBrowser control displays the Web page like the Internet Explorer 11.
Add the same dword inside
[HKEY_CURRENT_USER\Software\Microsoft\Internet
Explorer\Main\FeatureControl\FEATURE_NATIVE_DOCUMENT_MODE]
to be sure it works properly.

System events with vb.net service

I try to create windows service to write events win windows sessionswitch event, but when I make it in windows application it work fine but doesn't work with service.
After search I know the system events need message loop enabled so how I can enable it in vb.net windows service
In order to receive Windows Messages, your program must have a window. As noted on the SessionSwitch MSDN page:
In a Windows service, unless a hidden form is used or the message pump
has been started manually, this event will not be raised.
A link is included which gives an example showing how to receive these events with a hidden window. Message Only Windows are another, similar option for receiving window events and messages.

Disable auto snapping

i have a next question:
In Windows 8 when i tried to launch my other app from another app - there was no snapping by default, 1 application went to background and other went to front.
In windows 8.1 the application that lauched an URI goes to filled mode, but launchable app goes to snap - how to prevent this, and make it work like in Windows 8?
The Launcher that you use to invoke the second app accepts a LauncherOptions parameter. Use the DesiredRemainingView property to control the launch with regards to size.
By default it's the app that launches another app that controls how the view will be shared. It might be possible to override this behavior. Windows grants apps the option to enlarge themselves when requiring more space. It might be possible to invoke this method to enlarge a launched app.

How To Create Child Window in Windows Store Apps?

I am converting my windows phone app to windows 8. i am unable to found child windows control in windows 8. can any one help on this.
Windows Store Apps has Popup control. You can host any controls within it.
Popup class
XAML Popup sample
Making a Popup Window in C# Windows Metro (WinRT)

windows phone activex

We have created a C# windows form application that uses an ActiveX control to display video stream. Now we are planning to develop the same application in windows phone.
Is it possible to use ActiveX controls (OCX Files) in windows phone development?
No its not. You can only use Silverlight and XNA on Windows Phone.
You already have a Media content available using Silverlight that you can use to stream Video. You can find more information here:
http://msdn.microsoft.com/en-us/library/ff426928(v=VS.95).aspx
It can get as simple as something like this: