¿ Cómo Puedo Cambiar El Foco Entre Formularios Desde Código ?
Hola!.
Seguramente es que no lo entendí a la primera.
Si tengo dos formularios y quiero pasar el foco de un formulario a otro.¿ Como debo hacerlo ?.
He encontrado esto:
Citar:
Window Activation & Deactivation
To become the official active window, i.e. the window that is returned by the Application.ActiveWindow property, a window:
Must be a top-level window.
Or must implement the Form_Activate event handler if it is an embedded window.
When a control gets the focus, then its window becomes the active window, provided this window can become the current active window as explained above.
If its window cannot become the current active window, then the parent window of this window is tried, and so on, until a top-level window is reached.
Activating a window sends a Deactivate event to the old current active window, and an Activate event to the new one.
When the application is iconified, the current active window is deactivated. When the application is uniconified, then the current active window is reactivated again.
Cuando hablamos del foco siempre nos referimos a cambiar el foco a un componente concreto de la ventana activa, ¿ no ?.
Por otro lado dice que si un control toma el foco, su contenedor padre en este caso, una ventana o formulario pasa a ser la ventana activa.
Pues intente esto, pero tampoco va.
¿ No puedo hacer nada en el Activate del segundo formulario para solucionarlo ?.
Supongo que top-level window, se refería a ventanas embebidas.
¿ A que se refiere cuando dice que la ventana esta iconificada ?. Que esta en la barra del panel y no se muestra en el escritorio ?
Saludo
===================
Gambas Básico
"No es un bug, es una característica no documentada"