<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic You need at least one object… in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/How-show-window/m-p/57266#M11296</link>
    <description>You need at least one object per application, and if&amp;nbsp;you spy the main window as a Win32 element, there is an Activate action available.</description>
    <pubDate>Thu, 26 Jul 2018 23:40:00 GMT</pubDate>
    <dc:creator>PSSupport</dc:creator>
    <dc:date>2018-07-26T23:40:00Z</dc:date>
    <item>
      <title>How show window ?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-show-window/m-p/57264#M11294</link>
      <description>Hi,

I have an Internet Explorer window and another application that I launched via blue prism. How to switch between windows and do treatments on it???

Is there a basic function in blue Prism ?

&amp;nbsp;

I tried several codes:

In Initializes:

Public Class PInvoke

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Shared Function ShowWindow (ByVal hwnd As IntPtr, ByVal nCmdShow As Integer) As Boolean

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Function

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Shared Function SetForegroundWindow(ByVal hwnd2 As IntPtr) As Boolean

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Function

End Class

Public Declare Function BringWindowToTop Lib "user32" (ByVal hwnd As IntPtr) As Boolean

&amp;nbsp;

Object code:

PInvoke.ShowWindow(hWnd, nCmdShow) with hWnd the process ID and nCmdShow (https://msdn.microsoft.com/fr-fr/library/windows/desktop/ms633548(v=vs.85).aspx)

&amp;nbsp;

But the ShowWindow or&amp;nbsp;BringWindowToTop&amp;nbsp; or&amp;nbsp;SetForegroundWindow function does not seem to do anything, PB goes through the box but nothing happens.

&amp;nbsp;

Helppp!

&amp;nbsp;

&amp;nbsp;</description>
      <pubDate>Thu, 26 Jul 2018 18:24:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-show-window/m-p/57264#M11294</guid>
      <dc:creator>BordessoullesVi</dc:creator>
      <dc:date>2018-07-26T18:24:00Z</dc:date>
    </item>
    <item>
      <title>Ok I found a solution
The…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-show-window/m-p/57265#M11295</link>
      <description>Ok I found a solution
The problem comes from the hWind function of the ShowWindow function (hWnd, nCmdShow).
You should not use the Process Id of the window but use the ""handle of the window"" (use the FindWindow function).
&amp;nbsp;
But is there a basic function in blue Prism that does this (change active window) ?</description>
      <pubDate>Thu, 26 Jul 2018 19:41:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-show-window/m-p/57265#M11295</guid>
      <dc:creator>BordessoullesVi</dc:creator>
      <dc:date>2018-07-26T19:41:00Z</dc:date>
    </item>
    <item>
      <title>You need at least one object…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-show-window/m-p/57266#M11296</link>
      <description>You need at least one object per application, and if&amp;nbsp;you spy the main window as a Win32 element, there is an Activate action available.</description>
      <pubDate>Thu, 26 Jul 2018 23:40:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-show-window/m-p/57266#M11296</guid>
      <dc:creator>PSSupport</dc:creator>
      <dc:date>2018-07-26T23:40:00Z</dc:date>
    </item>
    <item>
      <title>spy the main window as a…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/How-show-window/m-p/57267#M11297</link>
      <description>spy the main window as a Win32 element 

why I didn't think about it :S&amp;nbsp; but I have a generic function now, no need to add in each objects actions activates '^^
thx</description>
      <pubDate>Fri, 27 Jul 2018 11:51:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/How-show-window/m-p/57267#M11297</guid>
      <dc:creator>BordessoullesVi</dc:creator>
      <dc:date>2018-07-27T11:51:00Z</dc:date>
    </item>
  </channel>
</rss>

