Thanks!
I just found it myself like this:
Dim handle As IntPtr = prcSiclid.MainWindowHandle
Dim Win32Help As New Win32Helper
If Not IntPtr.Zero.Equals(handle) Then
Win32Helper.ShowWindow(handle, 1)
Win32Helper.SetForegroundWindow(handle)
End If
Public NotInheritable Class Win32Helper
<System.Runtime.InteropServices.DllImport("user32. dll", _
EntryPoint:="SetForegroundWindow", _
CallingConvention:=Runtime.InteropServices.Calling Convention.StdCall, _
CharSet:=Runtime.InteropServices.CharSet.Unicode, SetLastError:=True)> _
Public Shared Function _
SetForegroundWindow(ByVal handle As IntPtr) As Boolean
' Leave function empty
End Function
<System.Runtime.InteropServices.DllImport("user32. dll", _
EntryPoint:="ShowWindow", _
CallingConvention:=Runtime.InteropServices.Calling Convention.StdCall, _
CharSet:=Runtime.InteropServices.CharSet.Unicode, SetLastError:=True)> _
Public Shared Function ShowWindow(ByVal handle As IntPtr, _
ByVal nCmd As Int32) As Boolean
' Leave function empty
End Function
End Class ' End Win32Helper
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:uou2YSzNEHA.620@TK2MSFTNGP10.phx.gbl...[color=blue]
> Windows Forms Tips and Tricks explains how to maintain a single instance[/color]
of[color=blue]
> an application and bring it to the front when it's activated.
>
>
http://www.bobpowell.net/tipstricks.htm
>
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Image transition effects, automatic persistent configuration and
> design time mouse operations all in April's issue of Well Formed
>
http://www.bobpowell.net/wellformed.htm
>
> Answer those GDI+ questions with the GDI+ FAQ
>
http://www.bobpowell.net/gdiplus_faq.htm
>
> The GDI+ FAQ RSS feed:
http://www.bobpowell.net/faqfeed.xml
> Windows Forms Tips and Tricks RSS:
http://www.bobpowell.net/tipstricks.xml
> Bob's Blog:
http://royo.is-a-geek.com/siteFeeder...aspx?FeedId=41
>
>
>
>
>
> "DraguVaso" <pietercoucke@hotmail.com> wrote in message
> news:O3isdJzNEHA.1160@TK2MSFTNGP09.phx.gbl...[color=green]
> > Hi,
> >
> > I want my application to bring another application to the Front.
> >
> > I thought best way to do this was by the Process-model:
> > Dim c As Process = Process.GetCurrentProcess()
> > Dim p As Process
> > For Each p In Process.GetProcessesByName("EXTRA")
> > If Left(p.MainWindowTitle, 4) = "Appl" Then
> > 'Here I should be able to Bring the Process to the[/color]
> Front!!![color=green]
> > Exit Function
> > End If
> > Next p
> >
> > Does anybody nows how to do this? Or another solution?
> >
> > Thanks!
> >
> > Pieter
> >
> >[/color]
>
>[/color]