Results 1 to 6 of 6

Thread: Where can one get Spy++ or something similar?

  1. #1

    Thread Starter
    Hyperactive Member Al Smith's Avatar
    Join Date
    May 1999
    Location
    Marcellus, MI. USA
    Posts
    330

    Post

    Hi,
    I'm starting to dink around with windows handles and I've seen a lot of mention of Spy++. Where can I find it or something similar?

    Thanks,
    Al.


    ------------------
    A computer is a tool, not a toy.
    <A HREF="mailto:[email protected]
    [email protected]">[email protected]
    [email protected]</A>


  2. #2
    Addicted Member Cbomb's Avatar
    Join Date
    Jul 1999
    Posts
    153

    Post

    I wrote a program exactly like Spy++ but it gives you only the handle of the window. If you want me to send it you, reply and tell me your email address
    ------------------
    Cbomb
    Teen Programmer
    Techie 8)



    [This message has been edited by Cbomb (edited 02-08-2000).]

  3. #3

    Thread Starter
    Hyperactive Member Al Smith's Avatar
    Join Date
    May 1999
    Location
    Marcellus, MI. USA
    Posts
    330

    Post

    Hi,
    Any program that might help me to learn would be appreciated.
    My email addresses are in my signature, i.e. [email protected].

    Thanks,
    Al.


    ------------------
    A computer is a tool, not a toy.
    <A HREF="mailto:[email protected]
    [email protected]">[email protected]
    [email protected]</A>


  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    SPY++ is included in Disc 1 (VS-6) in the COMMON\TOOLS Directory

  5. #5
    Addicted Member Daniel_Christie's Avatar
    Join Date
    Jan 2000
    Location
    USA
    Posts
    245

    Post

    I think Al Smith might not have (VS-6), so he probally is trying to find out where he may download just Spy++.

    Al Here is something similar.

    'Here is the source for a spy proggie.
    'If you can think of anything it lacks or needs,I'd be happy to listen ([email protected])

    ADD TO .BAS:
    Public Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long

    Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long

    Public Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As
    Long

    Public Declare Function GetModuleFileName Lib "kernel32" Alias "GetModuleFileNameA" (ByVal hModule As Long, ByVal lpFileName As String, ByVal
    nSize As Long) As Long

    Public Declare Function WindowFromPointXY Lib "user32" Alias "WindowFromPoint" (ByVal xPoint As Long, ByVal yPoint As Long) As Long

    Public Declare Function GetClassName& Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount
    As Long)

    Public Declare Function GetWindowWord Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long) As Integer

    Public Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long

    Public Type POINTAPI
    x As Long
    y As Long
    End Type

    Public Const GWL_STYLE = (-16)
    Public Const GWW_HINSTANCE = (-6)
    Public Const GWW_ID = (-12)
    Function WindowSPY(WinHdl As TextBox, WinClass As TextBox, WinTxt As TextBox, WinStyle As TextBox, WinIDNum As TextBox, WinPHandle As
    TextBox, WinPText As TextBox, WinPClass As TextBox, WinModule As TextBox)

    'Call This In Timer1
    Dim pt32 As POINTAPI, ptx As Long, pty As Long, sWindowText As String * 100
    Dim sClassName As String * 100, hWndOver As Long, hWndParent As Long
    Dim sParentClassName As String * 100, wID As Long, lWindowStyle As Long
    Dim hInstance As Long, sParentWindowText As String * 100
    Dim sModuleFileName As String * 100, r As Long
    Static hWndLast As Long
    Call GetCursorPos(pt32)
    ptx = pt32.x
    pty = pt32.y
    hWndOver = WindowFromPointXY(ptx, pty)


    If hWndOver &lt;&gt; hWndLast Then
    hWndLast = hWndOver
    WinHdl.Text = "Window Handle: " & hWndOver
    r = GetWindowText(hWndOver, sWindowText, 100)
    WinTxt.Text = "Window Text: " & Left(sWindowText, r)
    r = GetClassName(hWndOver, sClassName, 100)
    WinClass.Text = "Window Class Name: " & Left(sClassName, r)
    lWindowStyle = GetWindowLong(hWndOver, GWL_STYLE)
    WinStyle.Text = "Window Style: " & lWindowStyle
    hWndParent = GetParent(hWndOver)


    If hWndParent &lt;&gt; 0 Then
    wID = GetWindowWord(hWndOver, GWW_ID)
    WinIDNum.Text = "Window ID Number: " & wID
    WinPHandle.Text = "Parent Window Handle: " & hWndParent
    r = GetWindowText(hWndParent, sParentWindowText, 100)
    WinPText.Text = "Parent Window Text: " & Left(sParentWindowText, r)
    r = GetClassName(hWndParent, sParentClassName, 100)
    WinPClass.Text = "Parent Window Class Name: " & Left(sParentClassName, r)
    Else
    WinIDNum.Text = "Window ID Number: N/A"
    WinPHandle.Text = "Parent Window Handle: N/A"
    WinPText.Text = "Parent Window Text : N/A"
    WinPClass.Text = "Parent Window Class Name: N/A"
    End If
    hInstance = GetWindowWord(hWndOver, GWW_HINSTANCE)
    r = GetModuleFileName(hInstance, sModuleFileName, 100)
    WinModule.Text = "Module: " & Left(sModuleFileName, r)
    End If
    End Function


    ADD TO FORM1:
    Private Sub Timer1_Timer()
    WindowSPY Text1, Text2, Text3, Text4, Text5, Text6, Text7, Text8, Text9
    End Sub

    Enjoy!

  6. #6

    Thread Starter
    Hyperactive Member Al Smith's Avatar
    Join Date
    May 1999
    Location
    Marcellus, MI. USA
    Posts
    330

    Post

    Thanks Daniel. What a neat little program.
    Al.



    ------------------
    A computer is a tool, not a toy.
    <A HREF="mailto:[email protected][/EMAIL]

    [email protected]">[email protected]
    [EMAIL]
    [email protected]</A>

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