.NET Find The Current Window State Using Registry
By Goniey N (Mr. G)
How To Find The Current Window State Using Registry
string myWindowState=null;
var myRegistryKey = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("<<Give Here Your Window Form Path>>");
myWindowState = (string)myRegistryKey.GetValue("WindowState");
if (myWindowState != null && myWindowState.CompareTo("Maximized") == 0)
//Window Is In Maximized State & Perform Your Operation
else if (myWindowsState != null && myWindowsState.CompareTo("Minimized") == 0)
//Window Is In Minimized State & Perform Your Operation
else
//Window Is In Normal State & Perform Your Operation
.NET Find The Current Window State Using Registry (833 Views)