I've obtained the handle to a processes Main Window and would like to force that window to full screen. I'm programming in c#.Net with .Net framework V2.0 SP1
+2
A:
Here is an article that shows you how to do this. It requires P/Invoke into the Windows API for most of the calls, however.
Reed Copsey
2009-07-22 20:23:53
+1
A:
public void MaximizeForm(IntPtr handle)
{
Control c = Control.FromHandle(handle);
Form c_form = c as Form;
if (c_form != null)
{
if (c_form.InvokeRequired)
{
this.BeginInvoke(new MethodInvoker(delegate() { MaximizeForm(handle); }));
}
else
{
c_form.WindowState = FormWindowState.Maximized;
}
}
}
SwDevMan81
2009-07-22 20:43:35