Existe el evento ON RESTORE ? / There is ON RESTORE event?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Existe el evento ON RESTORE ? / There is ON RESTORE event?

Post by andyglezl »

Hola

Estoy tratando de adecuar el tamaño de una imagen de acuerdo a si MAXIMIZAN o RESTAURAN una ventana.
I'm trying to adjust the image size according to whether MAXIMIZE or RESTORE a window.

Code: Select all

       DEFINE WINDOW win_1 AT 0 , 0 WIDTH 324 HEIGHT 300 TITLE "Prueba" CHILD  NOSIZE TOPMOST ;
			   ON MAXIMIZE ( win_1.Image_1.Width := 1024, win_1.Image_1.Height := 768 )  ;
			   ON MINIMIZE (  win_1.Image_1.Width := 324,  win_1.Image_1.Height := 300 )
Si MINIMIZO, queda OK, pero tengo que MAXIMIZAR manualmente...
If minimized, is OK, but I have to manually MAXIMIZE ...

Necesito un comando que haga esto:
I need a command that does this:

ON RESTORE ( win_1.Image_1.Width := 324, win_1.Image_1.Height := 300 )

Alguien tiene una idea de como hacerlo ?
Anyone have an idea how to do?
Attachments
QueEventoEs.jpg
QueEventoEs.jpg (66.79 KiB) Viewed 955 times
Andrés González López
Desde Guadalajara, Jalisco. México.
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: Existe el evento ON RESTORE ? / There is ON RESTORE ev

Post by Javier Tovar »

Hola Andres,

Existe un ejemplo bueno en C:\hmg.3.3.1\SAMPLES\Basics\MAIN_AUTOADJUST, creo que te servirá! ya que el "Restore", se aplica al tamaño último antes de máximizar y con Restore regresa a ese tamaño, no seria mejor jugar con el tamaño de la ventana? "ON SIZE", como en el ejemplo que te mando el Link?

Saludos.
Post Reply