Page 1 of 1

Old Window Focus ?

Posted: Mon Sep 28, 2020 8:11 pm
by AUGE_OHR
hi,

when open new Windows i like it "on-Top" using TOPMOST
now when close this Windows last Window get Focus, OK

but when have

Code: Select all

Main Window
1st Window TOPMOST
2nd Window TOPMOST
3nd Window TOPMOST
and open 3th Window using TOPMOST, than 2nd Window is behind ( :?: ) 1st Window ... hm
when close 3th Window than 2nd Windows get Focus and i can close it too.
but now 1st Window does not become Focus :(

so i ask for "Old Window Focus"

i want to add

Code: Select all

LOCAL OldFocus := GetLastFocus()

   &OldFocus.SetFocus()
RETURN
as 1st line and last line in each new open Window
how to do it with harbour / HMG :idea:

Re: Old Window Focus ?

Posted: Mon Sep 28, 2020 10:48 pm
by srvet_claudio
Hi,
see:

- GetLastActiveFormIndex () --> Return nFormIndex
- GetLastActiveControlIndex () --> Return nControlIndex

- GetFormNameByIndex ( nFormIndex ) ---> Return cFormName
- GetControlNameByIndex ( nControlIndex ) ---> Return cControlName

Re: Old Window Focus ?

Posted: Tue Sep 29, 2020 8:34 am
by AUGE_OHR
hi,

thx, i will try it