We have an HTC handset running Windows Mobile 6.1. Is there a way to increase/decrease screen brightness for this device programmatically?
The application is being developed in C#, so a .NET wrapper would be preferable, but an unmanaged API would also be acceptable.
Also, how can we turn the screen on/off to save battery while a particular application is running?
You would use the power management APIs to change the backlight settings. Also the WinMo 5 SDKs ship with a sample application called Power Manager that demonstrates how to programmatically change the state of the backlight. It's in C, but is pretty straightforward to port.
Related
I am totally new to UWP and building an application that needs to take input from a barcode scanner using the UWP Point-of-Service API. I also have a legacy application that needs to take input from the scanner as key presses. My scanner (a Zebra 2208) doesn't seem to support switching between HID POS and HID keyboard mode automatically when it is claimed/unclaimed.
Is it possible to have my UWP app receive data from the scanner while running in the background and use the InputInjector API to send keys to the legacy application? If so, how?
#David Brown,
Background support for scanning barcodes was introduced in Windows 10 version 1903 (build 18362). This capability was also added to 1809 (build 17763) with the servicing update released in April 2019 (KB4490481). Please update your Windows installation to one of the above and give it a try.
Terry Warwick, Microsoft
Im doing work in collage with coding windows form apps. I'm doing it in C# although i don't think that impacts the problem I have.
When at home I wish to continue this coding but I can't as I have a macbook book.
My question is, is there any simple way to be able to code windows form app on a mac book. So far i have not been able to find a way to do this. Is there a way or do i have to save up and buy a laptop and run Windows on it.
Thanks
Scott
There's no way to develop for Windows Forms on a platform other that Windows itself. You might use other tech stacks or cross platform toolkits like GTK+ or Eto which can translate the designer code and create Windows Forms applications, but native Windows Forms development is not available due to a huge count of Windows-exclusive PInvokes. No chance here.
However, you don't need to have a Windows laptop to code on a mac - you always have the option to use virtualized desktops where the Windows system runs as a so called "image". Some are free and just require you to put in a Windows installation disk (or disk image) - so you run the installation in that virtualized system and can boot it shutdown it whenever you like. It is literally like having a computer in a computer. There are a lot of virtualization tools like VMWare Player or Oracles VirtualBox. On Mac, Parallels Desktop is very popular. It can integrate virtualized Windows applications to MacOS without having that virtualized image as "box" you connect to. The virtualized windows integrate quite seamlessly into the Mac desktop and support window management commands like App Exposé and Mission Control.
Another great options is to create an account on Microsoft Azure where you can rent virtual Windows systems online to a very low price. The benefit is, that those systems run in the clould and can be accessed from everywhere you'll ever go (as long as you have an internet connection).
I have seen this excellent post SO.
As most do, I began a new simple project that has no UI requirement. I noticed the Blank App ( Universal Windows ) option. What is the difference between that and a Console app?
I need an executable that will do some coverting of tiff to pdf type work on a every so often basis. ( every 30 minutes )
I also do not want a service, as in this case there is no need for it to constantly run
Universal Windows Blank app refers to Universal Windows Platform (UWP).
It uses a subset of .Net Framework, also has some parts that aren't in .Net Framework (thanks to #DavidJ comment) and has some other app behaviour limitations. It's used for apps running on wide range of devices like Windows PC, Windows phones, Xbox and other Microsoft products.
Look at particular quote:
Windows 10 makes it easier to develop apps for the UWP with just one API set, one app package, and one store to reach all Windows 10 devices – PC, tablet, phone, Xbox, HoloLens, Surface Hub and more.
So there's no need to use it just for Windows_PC_only console application.
More links:
https://en.wikipedia.org/wiki/Universal_Windows_Platform
https://msdn.microsoft.com/en-us/windows/uwp/get-started/whats-a-uwp
A customer needs an application running on an industry handheld device with barcode scanner.
Unfortunately, Windows 8.1 Embedded Handheld devices are rare, and Windows 10 Embedded devices are non-existent. Almost all devices currently available use Windows CE 6 or Windows Mobile 6.5.
As far as I know, (.NET) applications for Windows Mobile 6.5 are exclusively based on Compact Framework and WinForms, whereas Windows 8.1 Embedded software is (exclusively?) based on WinRT and XAML.
Is that correct? Is there no way to write a (.NET) application which
runs on current (Windows Mobile 6.5) devices and
will run Windows 8.1/10 Embedded devices?
You are right, there is no way to do that. The UI is based on winforms for 6.5 and XAML for 8/10.
The only thing you can try to do is to try to keep UI and business logic cleanly separated to simplify the migration.
Consider also that some features you had on 6.5 (ex: sql compact) have been dropped in 8/10 and the "replacement" may not be code-compatible and may lack some features.
You may try to build and test your non-UI code already on 8/10, so you can check that you are not using features that may impact your migration.
If you don't have to write native .NET-code, you should be able to use Rho Elements. Possibly there are other cross platform solutions that work as well.
Possibly you can go with Windows.Forms on Windows Mobile 6.5 and Xamarin on Windows Phone. You need to use a compatibilty layer for the Form code of Compact Framework and the one supported by Xamarin.
But I would recommend to go with HTML5 (use ZetaKey browser on Windows Mobile). Even RhoElements is based on HTML5 but with properietary extensions.
Yes, it is possible. You will have to implement all GUI logic platform dependent. And can share code using MVVM pattern. You may also need to switch to a database, that is available on both platforms like SQLite.
I've seen source code that's used to invoke the camera's LED light and this is used in a lot of flashlight apps on the store, however is there a way to programmatically invoke the Xenon lamps on the newer Nokia Windows Phones? I don't need it to be turned on constantly as I'm sure that'd cause the lamp to burn out. A simple example would be pressing a button and the flash gets invoked. If it's possible to access the LED flash through the camera API, is it possible to do the same with xenon flash through the same API's?
After looking through the Windows Phone 8 camera APIs and trying a few apps in the store, it doesn't look like it's possible to access the Xenon flash equipped handset (eg. Nokia Lumia 1020).
When the flash is invoked on the Lumia 1020, the LED flash/light comes on instead. This could be for a few reasons...
So existing/future flash light apps don't burn out or damage the Xenon flash.
Only Nokia phones feature a Xenon flash, but Nokia cannot add new APIs to WP8 as they're an OEM - they don't control the OS.
Currently, the only way the Xenon flash is activated is through the standard picture taking process.