473,394 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Maximize

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

Nov 22 '05 #1
4 1422
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" <Ch*****@CreateItSoftware.net> escribió en el mensaje
news:uZ**************@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

Nov 22 '05 #2
"Charles A. Lackman" <Ch*****@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/>

Nov 22 '05 #3
Hello,

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

Thanks
Chuck
"Charles A. Lackman" <Ch*****@CreateItSoftware.net> wrote in message
news:uZ**************@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

Nov 22 '05 #4
"Charles A. Lackman" <Ch*****@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/>

Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: w.p. | last post by:
I use code below: 1) frame receive too many maximize events on create and on close child window - why? 2) how to catch key events for wxMDIParentFrame ? 3) childWin.SetSize() in OnMaximize send...
1
by: Sanjay Seshasainam | last post by:
How can I maximize a process window I am using the Process class in System.Diagnostics. I can identify the specific process I want using the window title after that I want to maximize the...
1
by: Ralph | last post by:
Hi My users are going to toggle back and forth between DataSheet and Form view. This eliminates the need for a pile of queries <g> Anyway, I would like my form to be viewed at the current size...
7
by: Colleyville Alan | last post by:
I have an app that uses Access to grab various PowerPoint slides using the followhyperlink command. I have set the PPT window to run in a minimized state: FollowHyperlink link Set oPres =...
4
by: lauren quantrell | last post by:
I have an Access 2K popup form to which I have added buttons to run DoCmd.Maximize The problem is the form opens full height on the screen, with the bottom of the form hidden under the Windows...
1
by: Brandon | last post by:
Hello there. I'm currently working on a moderately complex Visual C# windows application that I have run into a bit of a problem on. To start things off, the application has normally been run...
3
by: guy | last post by:
VB2005 I have an MDI application, which displays modal forms correctly, and starts up with the MDI form maximized however for non modal forms behavious is unusual all forms have MaximizeBox,...
5
by: Mrozu | last post by:
Hi When I maximize a form in VB.Net 2003 the bottom of the form gets hidden by the start bar (so my status bar is invisible). How can I get my app to maximize to the usable screen area above...
4
by: EmilH | last post by:
Hi, Can anybody show me how to minimize/maximize a window dynamically? I placed buttons for each of these commands and want to place the code which will minimize and maximize the window. ...
3
by: =?Utf-8?B?Qm9iQWNoZ2lsbA==?= | last post by:
I give my user a button to change the properties of the size property of maximize screen size. How can I programmatically cause the maximize screen function to happen after changing the property...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.