Skip to main content

Unable to launch Windows Simulator on machine

For microsoft account users:

C:\Windows\System32\runas.exe /user:MyEmailaddress@Sample.com "C:\Program Files (x86)\Common Files\microsoft shared\Windows Simulator\15.0\Microsoft.Windows.Simulator.exe"

You can either copy the command to cmd or create a shortcut.

Comments

Popular posts from this blog

Your project is not referencing the "MonoAndroid,Version=v8.1" framework. Add a reference to "MonoAndroid,Version=v8.1" in the "frameworks" section of your project.json, and then re-run NuGet restore.

I had  the same problem.
Reason: file obj/project.assets.json target "MonoAndroid,Version=v7.1" when my project target android version 8.1
I resolved it by:
Right click Android project => Properties => Application => Compile
using Android version => Android 7.1Clean and Build project => build success, and restart IDE.Right click Android project => Properties => Application => Compile
using Android version => Android 8.1Clean and Build project => build success
File obj/project.assets.json updated to "MonoAndroid,Version=v8.1"

WPF - Checking Cap Lock Status in WPF

Checking Cap Lock status will be useful in Logon page where we can provide warning to user <Caps Lock is on. Having Caps Lock on may cause you to enter password incorrectly.>

Following sample uses the Control class that is a standard class within the System.Windows.Forms namespace. The DLL containing this namespace is automatically included in Windows Forms applications. The class includes a method named IsKeyLocked, which allows you to determine whether keys such as Caps Lock are switched on or off. To check the status of the Caps Lock key, you can use the method in the following manner:

Example:
privatevoid KeyDownEventHanlder(object sender, KeyEventArgs e)
{
if (Console.CapsLock == true)
{
lblError.Foreground = Brushes.Red;
lblError.Content = "Caps Lock is on.";// Having Caps Lock on may cause you to enter password incorrectly.";

}

else

{
if (lblError.Foreground == Brushes.Red)lblError.Foreground = Brushes.Transparent;
}

}