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

Re: Maximize by David

David
Mon Nov 29 13:12:54 CST 2004

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




"Charles A. Lackman" <Charles@CreateItSoftware.net> escribió en el mensaje
news:uZtBD1j1EHA.1124@tk2msftngp13.phx.gbl...
> 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
>
>
>



Re: Maximize by Herfried

Herfried
Mon Nov 29 12:19:15 CST 2004

"Charles A. Lackman" <Charles@CreateItSoftware.net> schrieb:
> 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)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


Re: Maximize by Charles

Charles
Mon Nov 29 13:44:52 CST 2004

Hello,

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

Thanks
Chuck


"Charles A. Lackman" <Charles@CreateItSoftware.net> wrote in message
news:uZtBD1j1EHA.1124@tk2msftngp13.phx.gbl...
> 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
>
>
>



Re: Maximize by Herfried

Herfried
Mon Nov 29 13:57:32 CST 2004

"Charles A. Lackman" <Charles@CreateItSoftware.net> schrieb:
> Thanks for the info, what about maximizing an app like notepad.exe if it
> is already running?

If you have the according 'Process' object, you can use p/invoke on
'ShowWindow' + the desired window state
(<URL:http://pinvoke.net/default.aspx/user32.ShowWindow>). The handle can
be taken from the 'Process' object's 'MainWindowHandle' property.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>