Results 1 to 10 of 10

Thread: [SOLVED] FindWindow function to find Google Chrome personal user's windows.

Threaded View

  1. #1

    Thread Starter
    Banned
    Join Date
    Jun 2014
    Location
    https://t.me/pump_upp
    Posts
    41

    Resolved [SOLVED] FindWindow function to find Google Chrome personal user's windows.

    Hello,

    So I have created and running multiple google chrome instances with different users. Link : http://image.prntscr.com/image/286c7...a5e58c5501.png

    I would like to find particular instance and bring it to front. But it's not working as expected.

    For example, For the "Person 12 - Goole Chrome" window, I tried to find with this but didn't work. Link : http://image.prntscr.com/image/15837...c8072627e2.png

    When I tried with notepad, it worked. Is there any other way to find the Google Chrome personal user's window and bring it to front ?

    PHP Code:
    Public Class Form1

        
    <DllImport("user32.dll"SetLastError:=TrueCharSet:=CharSet.Auto)>
        Private 
    Shared Function FindWindow(
         
    ByVal lpClassName As String,
         
    ByVal lpWindowName As String) As IntPtr
        End 
    Function

        <
    DllImport("user32.dll")>
        Private 
    Shared Function SetForegroundWindow(ByVal hWnd As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean
        End 
    Function

        Private 
    Sub Form1_Load(sender As ObjectAs EventArgsHandles MyBase.Load

            Dim Name 
    As String "Person 12 - Goole Chrome"
            
    Dim ptr As IntPtr FindWindow(NothingName)
            
    SetForegroundWindow(ptr)
        
    End Sub
    End 
    Class 

    Thank You!
    Last edited by abhishek009; Aug 3rd, 2016 at 12:43 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width