Results 1 to 4 of 4

Thread: Handling windows [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Fanatic Member Ruku's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    655

    Exclamation Handling windows [RESOLVED]

    VB Code:
    1. Private Declare Function BringWindowToTop Lib "user32" (ByVal hwnd As IntPtr) As IntPtr
    2.     Private Declare Function GetMainWindow Lib "user32" (ByVal hwnd As IntPtr) As IntPtr
    3.  
    4.     Public Sub SelectWindow(ByVal Process_hWnd As IntPtr)
    5.         'Bring target window to front
    6.         BringWindowToTop(GetMainWindow(Process_hWnd))
    7.     End Sub

    why isn't this working?

    called by:

    VB Code:
    1. hWndIntPtr = SOMEPROCESS.Handle
    2. [COLOR=Red]'EDITED:SelectWindow(New IntPtr(hWndIntPtr.ToInt64))[/COLOR]
    3. 'To this:
    4.  
    5. SelectWindow(hWndIntPtr)
    6.  
    7. 'DUH! :)



    EDIT:

    ok, a little more info...

    Error number: 453 "Unable to find entry point named GetMainWindow in DLL user32"...
    Last edited by Ruku; Jan 1st, 2006 at 08:25 PM.

    Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85,
    Website: http://DreamForgery.com

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