Results 1 to 8 of 8

Thread: [RESOLVED] [2005] can't get handle with FindWindowEx

Threaded View

  1. #1

    Thread Starter
    Frenzied Member vbdotnetboy's Avatar
    Join Date
    Jun 2004
    Location
    Lewisburg, PA "Next year Raiders in the Super Bowl"
    Posts
    1,310

    Resolved [RESOLVED] [2005] can't get handle with FindWindowEx

    *EDIT*

    ok i figured out what was causing the problem but maybe someone could still explain to me why. i took out the Auto in the declaration then it works so why does that matter???
    **********************************

    i'm using the FindWindowEx as the following


    VB Code:
    1. Public Declare Auto Function FindWindowEx Lib "user32" Alias "FindWindowExA" _
    2.         (ByVal hWnd1 As IntPtr, _
    3.          ByVal hWnd2 As IntPtr, _
    4.          ByVal lpsz1 As String, _
    5.          ByVal lpsz2 As String) As IntPtr

    I know the classname and the caption of the window i'm trying to get and i'm using the following code, but it's returning zero. accroding to what i saw on different site this should work for getting the window's handle. so my question is what am i doing wrong???

    VB Code:
    1. HSEstimateMainWinHWnd = WinAPI.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "ThunderRT6MDIForm", _
    2.             "Hendrick Manufacturing Order Estimating System")
    Last edited by vbdotnetboy; Jul 13th, 2006 at 09:17 AM. Reason: confused

    Derek - Using VS 2008 99% of the time and VS 2003 1% of the time

    Please Help Us To Save Ana

    ● Helpful Links: DNR TV | Awesome site for tips | Using ADO.NET to work with Excel | Xml Namespace 2.0 Framework Changes|Ultra High Security Password Generator | Mendhak's ADO.NET Tutorial
    ● Code Bank: Random Password Generator | Generic DbProviderFactory Access
    ● Site Work: Bottle Run Xtreme | Spaids Racing.com

    Company I work for - CSSI

    WHEN POSTING PLEASE INDICATE VERSION

    Please use vbcode tags or code tags when posting code
    [highlight=vb]ALL your code goes here[/highlight] or [code]ALL your code goes here[/code]

    If my post helped you in anyway... please be kind and give me some ratings

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