FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
minimiser fenêtre.... suite !
minimiser fenêtre.... suite !
Débuté par Paul, 01 mai 2006 17:39 - 2 réponses
Connectez-vous…
Paul
#1
Posté le 01 mai 2006 - 17:39
Bonjour, voici le code que j'utilise pour effectuer un traitement lorsque l'utilisateur clique sur le bouton minimiser de la fênetre principale dans mon appli...
cependant, ce code s'effectue sur n'importe quelle fenêtre de mon appli alors que je veux qu'il s'exécute pour le fenêtre principale uniquement... Qqn à une idée ???
merci !
Paul
********************************************************************88
Tout d'abord déclarer les constantes
//Specifies the type of resizing requested. This parameter can be one of the following values.
CONSTANT
SIZE_MAXHIDE= 0x0004
//Message is sent to all pop-up windows when some other window is
maximized.
SIZE_MAXIMIZED = 0x0003
//The window has been maximized.
SIZE_MAXSHOW = 0x0002
//Message is sent to all pop-up windows when some other window has
been restored to its former size.
SIZE_MINIMIZED = 0x0001
//The window has been minimized.
SIZE_RESTORED = 0x0000
//The window has been resized, but neither the SIZE_MINIMIZED nor
SIZE_MAXIMIZED value applies.
//lParam
//The low-order word of lParam specifies the new width of the client area.
//The high-order word of lParam specifies the new height of the client area.
FIN
Ensuite dans le code de déclaration des globales appeler la fonction sur evenemet
Evénement("ON_WM_SIZE", "*.", WM_SIZE)
puis créer la fonction ON_WM_SIZE
PROCEDURE ON_WM_SIZE(message,wParam,lParam)
SELON wParam
//Specifies the type of resizing requested. This parameter can be one of the following values.
CAS SIZE_MAXHIDE // ( 4 ou 0x0004 )
//Message is sent to all pop-up windows when some other window is
maximized.
Trace("SIZE_MAXHIDE largeur : "+PoidsFaible(lParam)+" Hauteur : "+PoidsFort(lParam))
CAS SIZE_MAXIMIZED // ( 3 ou 0x0003 )
//The window has been maximized. ( CLICK SUR LE BOUTON
D'AGRANDISSEMENT MAXI bouton de droite )
Trace("SIZE_MAXIMIZED largeur : "+PoidsFaible(lParam)+" Hauteur : "+PoidsFort(lParam))
CAS SIZE_MAXSHOW //( 2 ou 0x0002 )
//Message is sent to all pop-up windows when some other window
has been restored to its former size.
Trace("SIZE_MAXSHOW largeur : "+PoidsFaible(lParam)+" Hauteur : "+PoidsFort(lParam))
//
// MINIMISER C ICI
//
CAS SIZE_MINIMIZED // ( 1 ou 0x0001 )
//The window has been minimized. ( CLIC SUR LE BOUTON DE
REDUCTION bouton de gauche)
Trace("SIZE_MINIMIZED largeur : "+PoidsFaible(lParam)+" Hauteur : "+PoidsFort(lParam))
// ICI PoidsFaible(lParam) est toujours égal à 0 et PoidsFort(lParam)<=0
// j'ai toujours PoidsFort(lParam)=0 en MDI et PoidsFort(lParam) =-24 sans MDI
//
//
CAS SIZE_RESTORED // ( 0 ou 0x0000 )
//Changemet de taille manuel ( coin droite bas ) ou restoration
de la taille bouton du milieu .
Trace("SIZE_RESTORED largeur : "+PoidsFaible(lParam)+" Hauteur : "+PoidsFort(lParam))
//lParam
//The low-order word of lParam specifies the new width of the client area.
//The high-order word of lParam specifies the new height of the client area.
AUTRE CAS
FIN
Signaler
0
0
Philippe SAINT-BERTIN
#2
Posté le 02 mai 2006 - 11:04
Salut,
Je dirais que tu devrais mettre:
Evénement("ON_WM_SIZE", "Fenêtre Principale", WM_SIZE)
Bon dev,
Philippe
Paul a écrit :
Bonjour, voici le code que j'utilise pour effectuer un traitement lorsque l'utilisateur clique sur le bouton minimiser de la fênetre principale dans mon appli...
cependant, ce code s'effectue sur n'importe quelle fenêtre de mon appli alors que je veux qu'il s'exécute pour le fenêtre principale uniquement... Qqn à une idée ???
merci !
Paul
********************************************************************88
Tout d'abord déclarer les constantes
//Specifies the type of resizing requested. This parameter can be one of the following values.
CONSTANT
SIZE_MAXHIDE= 0x0004
//Message is sent to all pop-up windows when some other window is
maximized.
SIZE_MAXIMIZED = 0x0003
//The window has been maximized.
SIZE_MAXSHOW = 0x0002
//Message is sent to all pop-up windows when some other window has
been restored to its former size.
SIZE_MINIMIZED = 0x0001
//The window has been minimized.
SIZE_RESTORED = 0x0000
//The window has been resized, but neither the SIZE_MINIMIZED nor
SIZE_MAXIMIZED value applies.
//lParam
//The low-order word of lParam specifies the new width of the client area.
//The high-order word of lParam specifies the new height of the client area.
FIN
Ensuite dans le code de déclaration des globales appeler la fonction sur evenemet
Evénement("ON_WM_SIZE", "*.", WM_SIZE)
puis créer la fonction ON_WM_SIZE
PROCEDURE ON_WM_SIZE(message,wParam,lParam)
SELON wParam
//Specifies the type of resizing requested. This parameter can be one of the following values.
CAS SIZE_MAXHIDE // ( 4 ou 0x0004 )
//Message is sent to all pop-up windows when some other window is
maximized.
Trace("SIZE_MAXHIDE largeur : "+PoidsFaible(lParam)+" Hauteur : "+PoidsFort(lParam))
CAS SIZE_MAXIMIZED // ( 3 ou 0x0003 )
//The window has been maximized. ( CLICK SUR LE BOUTON
D'AGRANDISSEMENT MAXI bouton de droite )
Trace("SIZE_MAXIMIZED largeur : "+PoidsFaible(lParam)+" Hauteur : "+PoidsFort(lParam))
CAS SIZE_MAXSHOW //( 2 ou 0x0002 )
//Message is sent to all pop-up windows when some other window
has been restored to its former size.
Trace("SIZE_MAXSHOW largeur : "+PoidsFaible(lParam)+" Hauteur : "+PoidsFort(lParam))
//
// MINIMISER C ICI
//
CAS SIZE_MINIMIZED // ( 1 ou 0x0001 )
//The window has been minimized. ( CLIC SUR LE BOUTON DE
REDUCTION bouton de gauche)
Trace("SIZE_MINIMIZED largeur : "+PoidsFaible(lParam)+" Hauteur : "+PoidsFort(lParam))
// ICI PoidsFaible(lParam) est toujours égal à 0 et PoidsFort(lParam)<=0
// j'ai toujours PoidsFort(lParam)=0 en MDI et PoidsFort(lParam) =-24 sans MDI
//
//
CAS SIZE_RESTORED // ( 0 ou 0x0000 )
//Changemet de taille manuel ( coin droite bas ) ou restoration
de la taille bouton du milieu .
Trace("SIZE_RESTORED largeur : "+PoidsFaible(lParam)+" Hauteur : "+PoidsFort(lParam))
//lParam
//The low-order word of lParam specifies the new width of the client area.
//The high-order word of lParam specifies the new height of the client area.
AUTRE CAS
FIN
Signaler
0
0
Paul
#3
Posté le 02 mai 2006 - 16:24
Merci Philippe !!!!
tu as trouvé la solution....
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
WEBDEV (précédentes versions)
WINDEV Mobile (précédentes versions)
Etats & Requêtes
Hors-sujet
Outils
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte