Focus en window MDICHILD
Posted: Fri Jan 31, 2025 6:58 am
Hola a todos,
¿Cómo puedo saber si una de las window MDICHILD tiene el foco?
Gracias,
¿Cómo puedo saber si una de las window MDICHILD tiene el foco?
Gracias,
www.FiveTechSoft.com
https://fivetechsupport.com/forums/
Code: Select all | Expand
//--------------------------------------------------------------------------
METHOD MenuFolders( oButton, nRow, nCol ) CLASS TMdiChildFolder
LOCAL aVentanasMdi:=::Genera_botones_mdi()
LOCAL I:=1
local oMenu
LOCAL nRowMenu:=oButton:nTop+oButton:oWnd:nTop+oButton:nHeight
LOCAL nColMenu:=oButton:nLeft
MENU oMenu POPUP
FOR I=1 TO LEN(aVentanasMdi)
IF aVentanasMdi[i]==Self:cCaption
MENUITEM aVentanasMdi[i] OF oMenu CHECKED
ELSE
MENUITEM aVentanasMdi[i] OF oMenu
ENDIF
NEXT I
ENDMENU
FOR I=1 TO LEN(aVentanasMdi)
oMenu:aItems[i]:bAction := HazBlock(i)
NEXT I
oMenu:Activate( nRowMenu,nColMenu, Self , .f. )
RETURN(NIL)
//-----------------------------------------------------------------------------
Jesús, muy bonito y profesional tu diseño.JESUS MARIN wrote: Fri Jan 31, 2025 9:51 am Buenos dias
En mi entorno de pruebas, MdiChildFolder, creé una función que me muestra todas las ventanas MdiChild y me marca la que está activa.
Por lo tanto deberia ser sencillo resolverlo. Te copio el código de esta función
Code: Select all | Expand
//-------------------------------------------------------------------------- METHOD MenuFolders( oButton, nRow, nCol ) CLASS TMdiChildFolder LOCAL aVentanasMdi:=::Genera_botones_mdi() LOCAL I:=1 local oMenu LOCAL nRowMenu:=oButton:nTop+oButton:oWnd:nTop+oButton:nHeight LOCAL nColMenu:=oButton:nLeft MENU oMenu POPUP FOR I=1 TO LEN(aVentanasMdi) IF aVentanasMdi[i]==Self:cCaption MENUITEM aVentanasMdi[i] OF oMenu CHECKED ELSE MENUITEM aVentanasMdi[i] OF oMenu ENDIF NEXT I ENDMENU FOR I=1 TO LEN(aVentanasMdi) oMenu:aItems[i]:bAction := HazBlock(i) NEXT I oMenu:Activate( nRowMenu,nColMenu, Self , .f. ) RETURN(NIL) //-----------------------------------------------------------------------------
Estoy buscando algo que no precise código, alguna DATA.
Antonio Linares wrote: Fri Jan 31, 2025 10:06 pmJesús, muy bonito y profesional tu diseño.JESUS MARIN wrote: Fri Jan 31, 2025 9:51 am Buenos dias
En mi entorno de pruebas, MdiChildFolder, creé una función que me muestra todas las ventanas MdiChild y me marca la que está activa.
Por lo tanto deberia ser sencillo resolverlo. Te copio el código de esta función
Code: Select all | Expand
//-------------------------------------------------------------------------- METHOD MenuFolders( oButton, nRow, nCol ) CLASS TMdiChildFolder LOCAL aVentanasMdi:=::Genera_botones_mdi() LOCAL I:=1 local oMenu LOCAL nRowMenu:=oButton:nTop+oButton:oWnd:nTop+oButton:nHeight LOCAL nColMenu:=oButton:nLeft MENU oMenu POPUP FOR I=1 TO LEN(aVentanasMdi) IF aVentanasMdi[i]==Self:cCaption MENUITEM aVentanasMdi[i] OF oMenu CHECKED ELSE MENUITEM aVentanasMdi[i] OF oMenu ENDIF NEXT I ENDMENU FOR I=1 TO LEN(aVentanasMdi) oMenu:aItems[i]:bAction := HazBlock(i) NEXT I oMenu:Activate( nRowMenu,nColMenu, Self , .f. ) RETURN(NIL) //-----------------------------------------------------------------------------
Sería genial si compartieses un ejemplo para todos, gracias!