I have this:
Process process = new Process();
string VLCPath = ConfigurationManager.AppSettings["VLCPath"];
process.StartInfo.FileName = VLCPath;
process.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
process.Start();
But it wont start vlc maximized, what am I doing wrong? It keeps starting vlc in the state that I closed it the last time..
You can set the Window state to maximize with Microsofts ShowWindow function.
You will need the while loop because WaitForInputIdle() only waits until the process has started up. So there is a high chance that the MainWindowHandle is not set yet.