Old Window Focus ?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2061
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Old Window Focus ?

Post 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:
have fun
Jimmy
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Old Window Focus ?

Post by srvet_claudio »

Hi,
see:

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

- GetFormNameByIndex ( nFormIndex ) ---> Return cFormName
- GetControlNameByIndex ( nControlIndex ) ---> Return cControlName
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
AUGE_OHR
Posts: 2061
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Old Window Focus ?

Post by AUGE_OHR »

hi,

thx, i will try it
have fun
Jimmy
Post Reply