473,563 Members | 2,703 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 38294
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.c om" <fo***@nospam.D otNetMonster.co m>
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.Diagnost ics
..
..
..
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_SHOWMINIMIZE D = 2
SW_SHOWMAXIMIZE D = 3
SW_MAXIMIZE = 3
SW_SHOWNOACTIVA TE = 4
SW_SHOW = 5
SW_MINIMIZE = 6
SW_SHOWMINNOACT IVE = 7
SW_SHOWNA = 8
SW_RESTORE = 9
SW_SHOWDEFAULT = 10
SW_FORCEMINIMIZ E = 11
SW_MAX = 11
End Enum

Private Sub MaximizeAllNote pads()
For Each p As Process In Process.GetProc essesByName("no tepad")
ShowWindow(p.Ma inWindowHandle, 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
2668
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 consists of a bunch of components supplied by some application group. I got this to work, somewhat. The problem is that the application performs...
3
8023
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 a user makes changes on the data on the form and clicks on the form's Close button (instead of updating the datasource first), I want the program...
2
2803
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 supposed to do. To maximize the window I have to go to "task manager" and double click the application. How do I control those maximize, minimize...
3
5777
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 despite the controls being disabled in access, each form appear as a separate tab on the taskbar which can be minimized / maximized / closed (on right...
4
13446
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. Thanks in advance. Emil.
0
1657
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 produced by the external windows program (test.ext) within this timeout limit, I want to terminate the external windows program and continue with...
5
4010
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 THE EXIT.... *Please teach me how... tnx in advance... have a nice day...
0
1401
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 use to work fine, but recently they have stopped. Anyone got any ideas?
3
12656
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 work. can anyone help me out of this problem
0
7659
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7580
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7882
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7634
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7945
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5208
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3618
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2079
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 we have to send another system
0
916
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.