Click here to Skip to main content
15,900,110 members
Home / Discussions / C#
   

C#

 
GeneralRe: BadImageFormatException Pin
Gareth H17-Apr-07 4:04
Gareth H17-Apr-07 4:04 
GeneralRe: BadImageFormatException Pin
Pete O'Hanlon17-Apr-07 4:21
mvePete O'Hanlon17-Apr-07 4:21 
QuestionData Entry in DataGridView in winforms.net 2.0 Pin
Sendilkumar.M16-Apr-07 22:46
Sendilkumar.M16-Apr-07 22:46 
QuestionScaling issues in Winforms.net Pin
Sendilkumar.M16-Apr-07 22:39
Sendilkumar.M16-Apr-07 22:39 
QuestionGet a window of other application topmost Pin
outerlimit16-Apr-07 21:39
outerlimit16-Apr-07 21:39 
AnswerRe: Get a window of other application topmost [modified] Pin
kkun16-Apr-07 22:03
kkun16-Apr-07 22:03 
AnswerRe: Get a window of other application topmost Pin
Christian Graus16-Apr-07 22:30
protectorChristian Graus16-Apr-07 22:30 
AnswerRe: Get a window of other application topmost Pin
Martin#16-Apr-07 22:41
Martin#16-Apr-07 22:41 
Hello,

You have to use the MainWindowHandle property of the process in combination with BringWindowtoTop method of user32.dll.
[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern int BringWindowToTop(IntPtr hwnd);

public IntPtr HWND_TOPMOST =(IntPtr)(-1);
public IntPtr HWND_NOTOPMOST =(IntPtr)(-2);

    //Your method
    System.Diagnostics.ProcessStartInfo psi;
    psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized;
    psi.FileName = "???.exe";
    using(System.Diagnostics.Process process = new System.Diagnostics.Process())
    {
        process.Start(psi);
        process.WaitForInputIdle();
        BringWindowToTop(process.Handle);
    }    


Hope it helps!

All the best,

Martin
QuestionC# and DirectShow Pin
Evgeni5716-Apr-07 20:41
Evgeni5716-Apr-07 20:41 
AnswerRe: C# and DirectShow Pin
Sathesh Sakthivel16-Apr-07 20:53
Sathesh Sakthivel16-Apr-07 20:53 
GeneralRe: C# and DirectShow Pin
Evgeni5716-Apr-07 22:07
Evgeni5716-Apr-07 22:07 
AnswerRe: C# and DirectShow Pin
Christian Graus16-Apr-07 22:27
protectorChristian Graus16-Apr-07 22:27 
QuestionIntegrating C# and OpenGl Pin
a_david12316-Apr-07 19:55
a_david12316-Apr-07 19:55 
AnswerRe: Integrating C# and OpenGl Pin
blackjack215016-Apr-07 23:33
blackjack215016-Apr-07 23:33 
QuestionNHibernate integration : Castle vs Spring.net Pin
beatles169216-Apr-07 19:48
beatles169216-Apr-07 19:48 
AnswerRe: NHibernate integration : Castle vs Spring.net Pin
Sathesh Sakthivel16-Apr-07 20:07
Sathesh Sakthivel16-Apr-07 20:07 
GeneralRe: NHibernate integration : Castle vs Spring.net Pin
beatles169216-Apr-07 20:19
beatles169216-Apr-07 20:19 
GeneralRe: NHibernate integration : Castle vs Spring.net Pin
Sathesh Sakthivel16-Apr-07 20:20
Sathesh Sakthivel16-Apr-07 20:20 
GeneralRe: NHibernate integration : Castle vs Spring.net Pin
michael_sharif31-Jul-12 0:35
michael_sharif31-Jul-12 0:35 
QuestionHow to USE TablesOfContents.MarkEntry Pin
sulabh202016-Apr-07 19:11
sulabh202016-Apr-07 19:11 
QuestionNo one There! Pin
sulabh202016-Apr-07 20:51
sulabh202016-Apr-07 20:51 
GeneralThis is rude and ignorant! Pin
Martin#16-Apr-07 21:18
Martin#16-Apr-07 21:18 
GeneralRe: This is rude and ignorant! Pin
Muammar©16-Apr-07 23:12
Muammar©16-Apr-07 23:12 
AnswerRe: No one There! Pin
Colin Angus Mackay16-Apr-07 21:38
Colin Angus Mackay16-Apr-07 21:38 
GeneralRe: No one There! Pin
Pete O'Hanlon16-Apr-07 23:19
mvePete O'Hanlon16-Apr-07 23:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.