How would you keep a c# console application in the foreground at all times (on top of other windows)? I can't find a solution to this, so any help would be appreciated.
How to get C# Console App. Always visible?Hw to you keep a c# console app always on top of other windows?
Page 1 of 1
2 Replies - 5484 Views - Last Post: 26 May 2009 - 05:27 AM
Replies To: How to get C# Console App. Always visible?
#2
Re: How to get C# Console App. Always visible?
Posted 23 May 2009 - 06:36 PM
Off the top of my head, I think the only way to do something like that on a Windows operating system is to use unmanaged calls to the microsoft user32.dll (use DllImport), which has a method like FindWindow, which will allow you to find a specific open window by name or caption and return the handle to that window, and then call the dll's SetForegroundWindow method with said handle as the parameter. On the other hand, if it were a Form application instead of console application, you just need to call the form's BrintToFront method.
#3
Re: How to get C# Console App. Always visible?
Posted 26 May 2009 - 05:27 AM
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|