Just set islightdismissenabled property true for control. If popup is enabled and user clicks any where else the popup will be automatically disappeared.
NTSTATUS (WINAPI *RtlGetVersion)(LPOSVERSIONINFOEXW); OSVERSIONINFOEXW osInfo; *(FARPROC*)&RtlGetVersion = GetProcAddress(GetModuleHandleA( "ntdll" ), "RtlGetVersion" ); if (NULL != RtlGetVersion) { osInfo.dwOSVersionInfoSize = sizeof (osInfo); RtlGetVersion(&osInfo); } Use above method on all platform and it will work fine. Where GetOSVersionEx API deprecated by MS and gives wrong result on WIN 8.1. Tested above sample on XP to 8,1 and works for me. There is another alternative of manifest to use GetOSversionEx. Source: CodeProject
Following sample code will reset Internet Protocol version 4(Tcp/Ipv4) Properties to Obtain an IP address automatically and Obtain DNS server automatically private void RunCommand(String commandLineArgs) { System.Diagnostics.Process objProcess = new System.Diagnostics.Process(); objProcess.StartInfo.FileName = "C:\\Windows\\System32\\cmd.exe"; //objProcess.StartInfo.UseShellExecute = false; objProcess.StartInfo.Arguments = commandLineArgs; objProcess.StartInfo.CreateNoWindow = false; if (objProcess.StartInfo.Arguments.Length > 0) { objProcess.Start(); do { Thread.Sleep(100); } while (!objProcess.HasExited); } if (objProcess.ExitCode == 0) MessageBox.Show("Installed successfully....."); else MessageBox.Show("Oops smthng...
Comments