Maximize

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
 
H

Herfried K. Wagner [MVP]

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)
///
 
D

David

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);
 
C

Charles A. Lackman

Hello,

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

Thanks
Chuck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,124
Latest member
JuniorPell
Top