Maximize

  • Thread starter Thread starter Charles A. Lackman
  • Start date Start date
C

Charles A. Lackman

Hello,

I have an application that starts notepad.exe from a button click in VB.NET.
I am looking for a way to make the window maximize or minimize from the vb
app.

Any suggestions (if at all possible, detailed) will be greatly appeciated,

Thanks,

Chuck
 
Charles A. Lackman said:
I have an application that starts notepad.exe from a button click in
VB.NET. I am looking for a way to make the window maximize or minimize
from the vb app.

For example:

\\\
Call Shell("notepad", AppWinStyle.MaximizedFocus)
///

- or -

\\\
Dim psi As New ProcessStartInfo
With psi
.FileName = "notepad"
.WindowStyle = ProcessWindowStyle.Maximized
End With
Process.Start(psi)
///
 
Yo must use the ProcessStartInfo

System.Diagnostics.ProcessStartInfo myProc = new
System.Diagnostics.ProcessStartInfo();
myProc.FileName = "Notepad.exe";
myProc.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized;
System.Diagnostics.Process.Start(myProc);
 
Hello,

Thanks for the info, what about maximizing an app like notepad.exe if it is
already running?

Thanks
Chuck
 
Back
Top