A Couple things to improve

Started by Roger Garstang, February 17, 2010, 06:32:10 PM

Previous topic - Next topic

Roger Garstang

[GLOBAL | INSTANCE | LOCAL | STATIC | THREADED] added to dropdown list so DIM can declare a scope, right now typing as and local adds the wrong keyword.

I'm having a couple issues in the Form designer too.  The drag select still has problems selecting at times and either disappears without selecting something or when released the drag rectangle doesn't select anything and remains drawn on the screen(screen artifacts).  Selecting controls when placed on top of another still causes issues too.  The To Back and To Front to me always seems like a Graphics editor term and I expect moving something to the back to allow the control on top to be selected.  So I keep selecting it and messing up my tab order...and still can't click the control I want with it always selecting the one behind it.  When selecting a clicked control do you use RealChildWindowFromPoint or ChildWindowFromPoint...or did it make a difference?  I made a little app a while back to get control information before like WinSpector Spy does and used this function to get the control under the mouse:


Sub GetHwnd(ByVal pt As PointAPI)
Local childHwnd As Dword

    FF_StatusBar_SetText(HWND_CONTROLREADER_STATUSBAR, 0, "x-" + Format$(pt.x) + " y-" + Format$(pt.y))
    CurHwnd= WindowFromPoint(pt.x, pt.y)
    If CurHwnd = HWND_CONTROLREADER Or GetParent(CurHwnd) = HWND_CONTROLREADER Then CurHwnd= OldHwnd
    childHwnd= GetParent(CurHwnd)
    If childHwnd Then CurHwnd= childHwnd
   
    ScreenToClient(CurHwnd, pt)
    childHwnd = RealChildWindowFromPoint(CurHwnd, pt.x, pt.y)
    If childHwnd Then CurHwnd = childHwnd
   
   
    If OldHwnd = 0 Then ' First Time in
        OldHwnd= CurHwnd
        FrameWindow(CurHwnd) ' Paints a NOTXOR Red Frame around control
    ElseIf OldHwnd <> CurHwnd Then ' Been in before
        FrameWindow(OldHwnd)
        FrameWindow(CurHwnd)
        OldHwnd= CurHwnd
    Else' Same hWnd
        Exit Sub
    End If
   
    GetHwndInfo(CurHwnd)
End Sub       


WYSIWYG Web Builder which we both use has a modifier key to get child controls too, like controls placed in a web form to be drag selected selects the form unless CTRL is held then it selects the controls inside the form, etc.  Could have something like this in FF too and maybe even allow for container controls like a Frame when moved to also move controls inside of it too and give a more VB like feel since we all know the control is really a button class and such and isn't a container it could feel like it.