At 01:31 PM 3/14/2009, Mike Byerley wrote:

OK.. Here is the RBASE Only solution {TESTED}:

1.  In your CallingMDI forms onBefore declare the following Vars and
    STDCALL declaration:
    Set var vCallerHWND integer = 0
    SET VAR vforegrnd INTEGER = 0
    {This will return the HWND of whatever window you have clicked
    on or setFocus to}
    IF (chkfunc('GetForegroundWindow')) = 0 THEN
       STDCALL function 'GetForegroundWindow' () : integer
    ENDIF

2.  In your CallingMDI forms OnAfter:
    -- Get the window handle of this form
    SET VAR vThisWndtxt TEXT = NULL
    GETPROPERTY RBASE_FORM HANDLE 'vThisWndtxt'
    SET VAR vCallerHWND = (INT(.vThisWndtxt))
    recalc variables

3.  In your CallingMDI forms Timer event:
    {This will return the HWND of whatever window you have clicked
    on or setFocus to}
    SET VAR vforegrnd = (dlcall('user32.dll', 'GetForegroundWindow'))
    RECALC VARIABLES
    IF vforegrnd = .vcallerhwnd THEN
       SETFOCUS mditimer
    ENDIF


So eloquent and a perfect R:BASE solution, Mike!

Your tireless efforts and willingness to share your R:BASE knowledge
is unprecedented.

Those who take advantage of this solution should consider themselves
privileged to be part of such a fine group of R:BASE Users/Developers
on this R:BASE list.

Very Best R:egards,

Razzak.

--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, place any text to search for.
================================================


Reply via email to