Bring to Front

Discussion in 'ASP .Net' started by Charles A. Lackman, Dec 6, 2004.

  1. Hello,

    I have created an application that searches to see if a process is running
    and if it is it maximizes it's window.

    i.e.

    For Each AProcess In AProcesses
    If AProcess.StartInfo.WindowStyle <> ProcessWindowStyle.Maximized Then
    AProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
    ShowWindow(AProcess.MainWindowHandle, 3)
    End If
    Next

    Is there also a way to make the window "BRING TO FRONT" also?

    Thanks,

    Chuck
    Charles A. Lackman, Dec 6, 2004
    #1
    1. Advertising

  2. "Charles A. Lackman" <> schrieb:
    > For Each AProcess In AProcesses
    > If AProcess.StartInfo.WindowStyle <> ProcessWindowStyle.Maximized Then
    > AProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
    > ShowWindow(AProcess.MainWindowHandle, 3)
    > End If
    > Next
    >
    > Is there also a way to make the window "BRING TO FRONT" also?


    You can use the 'SetForegroundWindow' function (+ 'MainWindowHandle' as
    handle) to do that (for more info, see MSDN and
    <URL:http://www.pinvoke.net/>).

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
    Herfried K. Wagner [MVP], Dec 6, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tom
    Replies:
    7
    Views:
    5,953
    Luiz Vianna
    Nov 13, 2003
  2. Hyrum Mortensen

    hyperlink to bring up windows authentication

    Hyrum Mortensen, Jan 29, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    306
    Curt_C [MVP]
    Jan 29, 2004
  3. =?Utf-8?B?QUNhdW50ZXI=?=

    bring to front()

    =?Utf-8?B?QUNhdW50ZXI=?=, Feb 10, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    580
    =?Utf-8?B?QUNhdW50ZXI=?=
    Feb 10, 2005
  4. Replies:
    0
    Views:
    548
  5. Varun

    Bring to front a table on a static image

    Varun, Mar 4, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    268
    Varun
    Mar 4, 2004
Loading...

Share This Page