473,500 Members | 1,898 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Minimize, Maximize External Running Program through my VB.Net Application

I am New Member on this site. And also new learner to .Net.
I have a query, I have to minimize/maximize the currently running some
applications on my system through my VB.Net application.

Please can any one help me..!!!
Nov 21 '05 #1
2 38252
If you want the current application minimized/maximized then do this:

Me.WindowState = FormWindowState.Maximized
Me.WindowState = FormWindowState.Minimized
Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #2
"Ramkishan Algude via DotNetMonster.com" <fo***@nospam.DotNetMonster.com>
schrieb:
I have a query, I have to minimize/maximize the currently running some
applications on my system through my VB.Net application.

P/invoke with 'ShowWindow':

\\\
Imports System.Diagnostics
..
..
..
Private Declare Function ShowWindow Lib "user32.dll" ( _
ByVal hWnd As IntPtr, _
ByVal nCmdShow As SHOW_WINDOW _
) As Boolean

<Flags()> _
Private Enum SHOW_WINDOW As Integer
SW_HIDE = 0
SW_SHOWNORMAL = 1
SW_NORMAL = 1
SW_SHOWMINIMIZED = 2
SW_SHOWMAXIMIZED = 3
SW_MAXIMIZE = 3
SW_SHOWNOACTIVATE = 4
SW_SHOW = 5
SW_MINIMIZE = 6
SW_SHOWMINNOACTIVE = 7
SW_SHOWNA = 8
SW_RESTORE = 9
SW_SHOWDEFAULT = 10
SW_FORCEMINIMIZE = 11
SW_MAX = 11
End Enum

Private Sub MaximizeAllNotepads()
For Each p As Process In Process.GetProcessesByName("notepad")
ShowWindow(p.MainWindowHandle, SHOW_WINDOW.SW_MAXIMIZE)
Next p
End Sub
///

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

Nov 21 '05 #3

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

Similar topics

8
2659
by: nickdu | last post by:
I'm trying to isolate "applications" into their own application domain within a single process. I've quoted applications because it's a logical representation of an application. Basically it...
3
7997
by: Stanav | last post by:
Hello all, Is there a way I can get into a form's close/minimize/maximize events when those buttons (the 3 small squared button in the upper right corner of a form) are clicked? For example, after...
2
2793
by: jj | last post by:
I have a single threaded application in c# that scans through a file system. While doing this if I try to minimize, maximize buttons on the top,right hand corner of my form do not do as they are...
3
5748
by: philelpko | last post by:
Morning all, 2 questions...... I have disabled the control boxes, minimize/maximize, resize etc on my forms so users cannot do anything other than what the forms allow. The problem is that...
4
13440
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. ...
0
1650
by: Chico Jayanthan | last post by:
Hi, I call an external windows program (.exe) from a python script. Something like os.system('test.exe'). I want to set a timeout for the external windows program to return. If no results are...
5
4005
variouz3ckz
by: variouz3ckz | last post by:
ei is there anyone who has the knowledge of Einstein and Bill Gates genius-like who will help me to remove the following buttons in the upper-right corner... MINIMIZE.... MAXIMIZE.... OR EVEN...
0
1395
by: =?Utf-8?B?Ym9hdGFibGU=?= | last post by:
Some of my shortcuts that use to allow my to left click properties run: minimize/maximize do nothing. They allow me to change to but after change minimize/maximize behavior does not change. They...
3
12642
by: paull | last post by:
I am opening a pop up window using window.open(), I want to hide the close/minimize/maximize button in the top right had corner of the window. I tried passin the parameter titlebar=no , but it din't...
0
7136
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
7018
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
7232
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...
0
7397
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4611
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1430
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
316
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.