I building on the sample given to me by Idle_Mind in the related question. I'm trying to only get it to highlight and display main forms and dialogs and not the controls within a dialog.
i.e. If I were to spy on wordpad. I only want to see the main frame, but not the toolbar, ruler or the richtext window.
Is this possible, if so how?
I presume I would just do a check in the picturebox1_Movemove event and do a check in the following routine:
If Not handle.Equals(prevHandle) Then
' get new rectangle
' draw new rectangle
ControlPaint.DrawReversibleFrame(New Rectangle(prevRC.Left, prevRC.Top, prevRC.Right - prevRC.Left, prevRC.Bottom - prevRC.Top), Color.Black, FrameStyle.Thick)