How to launch my app via NFC tag?

Windows 10 Mobile UWP If you are only targeting Windows 10 Mobile, the 8.1 way still works, given that you get the right App ID. It can be retrieved through: Windows.ApplicationModel.Store.CurrentApp.AppId However, that only works when the app is installed through the store, as the ID is assigned during store association / publishing. In developer … Read more

How can I detect when Windows 10 enters tablet mode in a Windows Forms application?

To get whether the system is in tablet mode or not, query the system metric ConvertibleSlateMode like so (not tested, but it should work fine as far back as XP): public static class TabletPCSupport { private static readonly int SM_CONVERTIBLESLATEMODE = 0x2003; private static readonly int SM_TABLETPC = 0x56; private static Boolean isTabletPC = false; … Read more

How do you set the glass blend colour on Windows 10?

Since GDI forms on Delphi don’t support alpha channels (unless using alpha layered windows, which might not be suitable), commonly the black color will be taken as the transparent one, unless the component supports alpha channels. tl;dr Just use your TTransparentCanvas class, .Rectangle(0,0,Width+1,Height+1,222), using the color obtained with DwmGetColorizationColor that you could blend with a … Read more

WSL-2 DNS is not working with VPN connection on Win 10 [closed]

There is an issue with DNS Forwarding in WSL2 when using VPN (see github Issue). Plus there is a issue with the Cisco AnyConnect. So here is a workaround for these problems. Should work for Ubuntu and Debian. Workaround (new – automatic) This solution is automatic and was created by EdwardCooke (see https://www.frakkingsweet.com/automatic-dns-configuration-with-wsl-and-anyconnect-client/). This is … Read more

How to change Highlight color of the selected ListView item in UWP (Windows 10)

Actually a better way to discover the styling properties is to use Blend. First, open up your page in Blend. Then right click on your ListView and go Edit Additional Templates > Edit Generated Item Container (ItemContainerStyle) > Edit a Copy. Give it a name and hit OK. Now, you have generated the full built-in … Read more

Get Screen Resolution in Win10 UWP App

To improve the other answers even a bit more, the following code also takes care of scaling factors, e.g. for my 200% for my Windows display (correctly returns 3200×1800) and 300% of the Lumia 930 (1920×1080). var bounds = ApplicationView.GetForCurrentView().VisibleBounds; var scaleFactor = DisplayInformation.GetForCurrentView().RawPixelsPerViewPixel; var size = new Size(bounds.Width*scaleFactor, bounds.Height*scaleFactor); As stated in the other … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)