473,378 Members | 1,518 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,378 software developers and data experts.

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 38213
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.