Problema con ToolBar - IsWindowActive - IsWindowDefined

Moderator: Rathinagiri

Post Reply
Mario Mansilla
Posts: 269
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina

Problema con ToolBar - IsWindowActive - IsWindowDefined

Post by Mario Mansilla »

Hola Amigos :
Tengo un problema con el funcionamiento del control Toolbar :( .
Este se manifiesta cuando el usuario o bien clickea varias veces sin querer o bien no funciona bien su mouse , provocando que se ejecute varias veces la accion del control .
Esto provoca que me de error de ventana ya definida .
Probe con el uso de las funciones IsWindowDefined y IsWindowActive sin resultados .
Esto solo sucede con el control Toolbar , no con el control Button el cual funciona perfecto .
Estoy usando hmg.3.046 con su respectivo Ide con win xp sp2
Les adjunto un pequeño proyecto para que lo evaluen

Saludos cordiales
Mario Mansilla

Hello Friends:
I have a problem with the Toolbar control operation :( .
This occurs when the user either accidentally click a few times or your mouse is not working properly, causing it to run several times the action of the control.
This causes the error I already defined window.
Probe with using functions and IsWindowActive IsWindowDefined no results.
This only happens with the Toolbar control, not with the Button control which works perfect.
I'm using hmg.3.046 with their respective Ide with win xp sp2
I attached a small project for evaluation

Best Regards
Mario Mansilla
Attachments
Window.rar
(10.88 KiB) Downloaded 335 times
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Problema con ToolBar - IsWindowActive - IsWindowDefined

Post by danielmaximiliano »

Fijate esto:

Code: Select all

#include <hmg.ch>

Function Prg1

   If ! IsWindowDefined(Form_1)
        Load Window Form_1
        Form_1.Center
        Form_1.Activate
      	 
   Else
       If IsWindowActive(Form_1)
            Form_1.Setfocus
       Else
            Form_1.Restore	  
       Endif	
      
   Endif
   
Return
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Mario Mansilla
Posts: 269
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina

Re: Problema con ToolBar - IsWindowActive - IsWindowDefined

Post by Mario Mansilla »

Hola Daniel :
Perfecto funciona correctamente tambien con ventanas child que es el objeto de estas pruebas :) .
Ahora no entiendo porque se manifestaba con el control Toolbar y no el control Button :? .
Saludos .
Mario Mansilla
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Problema con ToolBar - IsWindowActive - IsWindowDefined

Post by Rathinagiri »

Very nice Daniel. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Post Reply