Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

c# make another application alwaysontop

Status
Not open for further replies.

meeeeeeeeeep

Programmer
Joined
Mar 20, 2006
Messages
1
Location
NO
Hi. I have just started programming C# in school, and i wonder if someone know how i can make another program topmost. (if its possible)

My application can start other files, eg .doc or .ppt, but i dont know how i can make MS Word or MS PowerPoint to be always on top. Can anyone help me with this? (or tell me that this is not possible..) Code examples would be great, but i'll be happy with any help i can get.

I have tryed to search with google and yahoo, but cant find anything like this. Maybe im the first one to try this.

By the way, the code will be used in a school project..

Regards
 
I don't think this is easy at all without dipping into the Win32 API.

I've recently spent some time working with the process object in C# to control other apps and it's difficult at best.

I guess you could fire up Word in a process of it's own and then put your app to the back, or minimise it. Have a look at System.Diagnostics.Process in MSDN and see if that helps.

Good luck
 
If it's only MS Office applications you can actually use OLE Automation to controll the applications. This includes showing them.

then you can set the z order of your form to be behind.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top