How do I take a screenshot from an UWP?
up vote
-1
down vote
favorite
I want to read my bluetooth le heart rate sensor output programmatically.
- I tried c#, but it seems I need to use uwp.
- I tried taking a screenshot in uwp - forbidden.
- I tried executing an external program that takes a screenshot - forbidden.
- I tried to send keystrokes Win - Printscreen to take a screenshot - forbidden.
How do I take a screenshot from an UWP?
c# uwp
add a comment |
up vote
-1
down vote
favorite
I want to read my bluetooth le heart rate sensor output programmatically.
- I tried c#, but it seems I need to use uwp.
- I tried taking a screenshot in uwp - forbidden.
- I tried executing an external program that takes a screenshot - forbidden.
- I tried to send keystrokes Win - Printscreen to take a screenshot - forbidden.
How do I take a screenshot from an UWP?
c# uwp
This project might help you: github.com/jlennox/HeartRate
– RQDQ
Nov 7 at 19:26
@RQDQ Good suggestion.
– Uli Loose
Nov 7 at 19:56
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I want to read my bluetooth le heart rate sensor output programmatically.
- I tried c#, but it seems I need to use uwp.
- I tried taking a screenshot in uwp - forbidden.
- I tried executing an external program that takes a screenshot - forbidden.
- I tried to send keystrokes Win - Printscreen to take a screenshot - forbidden.
How do I take a screenshot from an UWP?
c# uwp
I want to read my bluetooth le heart rate sensor output programmatically.
- I tried c#, but it seems I need to use uwp.
- I tried taking a screenshot in uwp - forbidden.
- I tried executing an external program that takes a screenshot - forbidden.
- I tried to send keystrokes Win - Printscreen to take a screenshot - forbidden.
How do I take a screenshot from an UWP?
c# uwp
c# uwp
edited Nov 8 at 0:33
Handbag Crab
1,245212
1,245212
asked Nov 7 at 19:23
Uli Loose
13
13
This project might help you: github.com/jlennox/HeartRate
– RQDQ
Nov 7 at 19:26
@RQDQ Good suggestion.
– Uli Loose
Nov 7 at 19:56
add a comment |
This project might help you: github.com/jlennox/HeartRate
– RQDQ
Nov 7 at 19:26
@RQDQ Good suggestion.
– Uli Loose
Nov 7 at 19:56
This project might help you: github.com/jlennox/HeartRate
– RQDQ
Nov 7 at 19:26
This project might help you: github.com/jlennox/HeartRate
– RQDQ
Nov 7 at 19:26
@RQDQ Good suggestion.
– Uli Loose
Nov 7 at 19:56
@RQDQ Good suggestion.
– Uli Loose
Nov 7 at 19:56
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
To your first point, most of the Bluetooth APIs are marked with the DualApiPartionAttribute - that means they can be called from UWP or a regular Win32/Winforms/WPF/.NET application. Visual Studio doesn't make this easy to reference for you yet. You need to first add the reference to the union Windows.WinMD for the version of windows you want to target, ie:
- C:Program Files (x86)Windows Kits10UnionMetadata10.0.16299.0Windows.Winmd
and since many of apis are Async() you'll need to reference:
- C:WindowsMicrosoft.NETFrameworkv4.0.30319System.Runtime.WindowsRuntime.dll
Then the sample code looks essentially the same as UWP but called from your .NET app:
- https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/DeviceEnumerationAndPairing
- https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BluetoothLE
To your other questions about Screen capture, starting in Windows 1803, windows added a new Graphics Capture capability and apis. These classes are also marked DualApiPartitionAttribute so you can call them from either UWP or your Win32/.NET application. You can find more about them here:
- https://docs.microsoft.com/en-us/uwp/api/windows.graphics.capture
Hope this helps,
-Adam
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
To your first point, most of the Bluetooth APIs are marked with the DualApiPartionAttribute - that means they can be called from UWP or a regular Win32/Winforms/WPF/.NET application. Visual Studio doesn't make this easy to reference for you yet. You need to first add the reference to the union Windows.WinMD for the version of windows you want to target, ie:
- C:Program Files (x86)Windows Kits10UnionMetadata10.0.16299.0Windows.Winmd
and since many of apis are Async() you'll need to reference:
- C:WindowsMicrosoft.NETFrameworkv4.0.30319System.Runtime.WindowsRuntime.dll
Then the sample code looks essentially the same as UWP but called from your .NET app:
- https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/DeviceEnumerationAndPairing
- https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BluetoothLE
To your other questions about Screen capture, starting in Windows 1803, windows added a new Graphics Capture capability and apis. These classes are also marked DualApiPartitionAttribute so you can call them from either UWP or your Win32/.NET application. You can find more about them here:
- https://docs.microsoft.com/en-us/uwp/api/windows.graphics.capture
Hope this helps,
-Adam
add a comment |
up vote
2
down vote
To your first point, most of the Bluetooth APIs are marked with the DualApiPartionAttribute - that means they can be called from UWP or a regular Win32/Winforms/WPF/.NET application. Visual Studio doesn't make this easy to reference for you yet. You need to first add the reference to the union Windows.WinMD for the version of windows you want to target, ie:
- C:Program Files (x86)Windows Kits10UnionMetadata10.0.16299.0Windows.Winmd
and since many of apis are Async() you'll need to reference:
- C:WindowsMicrosoft.NETFrameworkv4.0.30319System.Runtime.WindowsRuntime.dll
Then the sample code looks essentially the same as UWP but called from your .NET app:
- https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/DeviceEnumerationAndPairing
- https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BluetoothLE
To your other questions about Screen capture, starting in Windows 1803, windows added a new Graphics Capture capability and apis. These classes are also marked DualApiPartitionAttribute so you can call them from either UWP or your Win32/.NET application. You can find more about them here:
- https://docs.microsoft.com/en-us/uwp/api/windows.graphics.capture
Hope this helps,
-Adam
add a comment |
up vote
2
down vote
up vote
2
down vote
To your first point, most of the Bluetooth APIs are marked with the DualApiPartionAttribute - that means they can be called from UWP or a regular Win32/Winforms/WPF/.NET application. Visual Studio doesn't make this easy to reference for you yet. You need to first add the reference to the union Windows.WinMD for the version of windows you want to target, ie:
- C:Program Files (x86)Windows Kits10UnionMetadata10.0.16299.0Windows.Winmd
and since many of apis are Async() you'll need to reference:
- C:WindowsMicrosoft.NETFrameworkv4.0.30319System.Runtime.WindowsRuntime.dll
Then the sample code looks essentially the same as UWP but called from your .NET app:
- https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/DeviceEnumerationAndPairing
- https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BluetoothLE
To your other questions about Screen capture, starting in Windows 1803, windows added a new Graphics Capture capability and apis. These classes are also marked DualApiPartitionAttribute so you can call them from either UWP or your Win32/.NET application. You can find more about them here:
- https://docs.microsoft.com/en-us/uwp/api/windows.graphics.capture
Hope this helps,
-Adam
To your first point, most of the Bluetooth APIs are marked with the DualApiPartionAttribute - that means they can be called from UWP or a regular Win32/Winforms/WPF/.NET application. Visual Studio doesn't make this easy to reference for you yet. You need to first add the reference to the union Windows.WinMD for the version of windows you want to target, ie:
- C:Program Files (x86)Windows Kits10UnionMetadata10.0.16299.0Windows.Winmd
and since many of apis are Async() you'll need to reference:
- C:WindowsMicrosoft.NETFrameworkv4.0.30319System.Runtime.WindowsRuntime.dll
Then the sample code looks essentially the same as UWP but called from your .NET app:
- https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/DeviceEnumerationAndPairing
- https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BluetoothLE
To your other questions about Screen capture, starting in Windows 1803, windows added a new Graphics Capture capability and apis. These classes are also marked DualApiPartitionAttribute so you can call them from either UWP or your Win32/.NET application. You can find more about them here:
- https://docs.microsoft.com/en-us/uwp/api/windows.graphics.capture
Hope this helps,
-Adam
edited Nov 8 at 0:27
answered Nov 8 at 0:17
Adam Braden - MSFT
665
665
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53196399%2fhow-do-i-take-a-screenshot-from-an-uwp%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
This project might help you: github.com/jlennox/HeartRate
– RQDQ
Nov 7 at 19:26
@RQDQ Good suggestion.
– Uli Loose
Nov 7 at 19:56