txtX = "X = " & pt.x & " Y = " & pt.y 'txtY = pt.y ' Get window handle from mouse location hCurrent = WindowFromPoint (pt.x, pt.y) If hCurrent <> hPrevious Then ' Change of window txthWnd = "&H" & Hex$ (hCurrent) & " (" & hCurrent & ")" ' Get class name txtClass = GetClass(hCurrent) ' Get caption txtCaption = GetCaption(hCurrent) ' Get style txtStyle = "&H" & Hex$ (GetWindowLong(hCurrent, GWL_STYLE)) ' Get extended style txtEXStyle = "&H" Hex$ (GetWindowLong(hCurrent, GWL_EXSTYLE)) ' Get window ID txtID = GetWindowLong(hCurrent, GWL_ID) ' Get rectangle lretSpy = GetWindowRect(hCurrent, rectCurrent) ' Invert the borders of previous rectangle ' Top line rectTemp = rectPrev rectTemp.Bottom = rectPrev.Top + PEN_WIDTH InvertRect hDCScreen, rectTemp ' Bottom line rectTemp = rectPrev rectTemp.Top = rectPrev.Bottom - PEN_WIDTH InvertRect hDCScreen, rectTemp ' Left side rectTemp = rectPrev rectTemp.Right = rectPrev.Left + PEN_WIDTH InvertRect hDCScreen, rectTemp ' Right side rectTemp = rectPrev rectTemp.Left = rectPrev.Right - PEN_WIDTH InvertRect hDCScreen, rectTemp ' Invert the borders of new rectangle ' Top line rectTemp = rectCurrent rectTemp.Bottom = rectCurrent.Top + PEN_WIDTH InvertRect hDCScreen, rectTemp ' Bottom line rectTemp = rectCurrent rectTemp.Top = rectCurrent.Bottom - PEN_WIDTH InvertRect hDCScreen, rectTemp |