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

Maximize an other application from my csharp application

Hello,

I want to maximize an other running application from my C#
application.
First I want tot test if the application is running, and then maximize
it from my csharp application.
How can I do that?

Thanks
Bart
Jun 27 '08 #1
1 4153
On May 23, 11:56 am, "peete...@gmail.com" <peete...@gmail.comwrote:
Hello,

I want to maximize an other running application from my C#
application.
First I want tot test if the application is running, and then maximize
it from my csharp application.
How can I do that?

Thanks
Bart
You can use ShowWindow API via P/invoke. And use GetProcessByName from
Process class in a for-each loop then call ShowWindow function API.

For decleration more info:
http://www.pinvoke.net/default.aspx/...howWindow.html

After declaring API, simply use:
// For example maximize notepad
foreach (Process p in Process.GetProcessesByName("notepad"))
{
ShowWindow(p.MainWindowHandle, SHOW_WINDOW.SW_MAXIMIZE);
}

Thanks,

Onur Güzel
Jun 27 '08 #2

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

Similar topics

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 =...
2
by: Scott | last post by:
I've used the DoCmd.Mazimize function on my databases main opening form and now all the forms maximize on open, not just the form the command has been placed in. (onOpen) Any ideas why or how I...
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...
7
by: Bhargavan | last post by:
Hey Group, When I minimize and then maximize a form (in windows application), I see a significant drop in memory usuage in the task manager. I tried to do the same thing programatically during the...
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...
4
by: Mark | last post by:
We have a windows 2000 server with terminal services activated. Users will connect using RDP and launch an application. Sometimes, users will minimize the application when they meant to minimize...
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...
1
by: neeraj | last post by:
Hi people's I developed one MDI application with one MDI form and 2 child forms, form. Border style of first child forms set as Fixed3D and Window State set as normal (like dialog Box) and...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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...

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.