<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.fr.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>6 Nov 2018 15:24:37 Z</lastBuildDate><pubDate>5 Nov 2018 10:48:47 Z</pubDate><description>Bonjour,&#13;
&#13;
Je cherche, à partir d'une appli WINDEV à intercepter la touche &lt;F1&gt; depuis n'importe quelle application 'non WINDEV' dans Windows (10) ; ce que j'ai réalisé avec le code suivant :&#13;
&#13;
NB_0 : j'ai simplement remplacé la PROCÉDURE Incrémenter() dans la fenetre &lt; FEN_thread.wdw  &gt; de l'exemple &lt; Exemple d'un thread &gt; avec ce qui suit (cf. le code ci-infra)&#13;
&#13;
Cette procédure [ PROCÉDURE Incrémenter() ] est appelée par l'instruction :&#13;
&lt; ThreadExécute("monthread",threadNormal,Incrémenter) &gt;&#13;
&#13;
NB_1 : je découvre les threads, services et autres API windows ...&#13;
&#13;
[code:wl]&#13;
PROCÉDURE Incrémenter()&#13;
&#13;
//  PROCÉDURE Incrémenter() : dans la fenêtre &lt; FEN_thread.wdw  &gt; de l'exemple &lt; Exemple d'un thread &gt;&#13;
//  NB : VK_F1 = 0x70 = F1 key&#13;
&#13;
TANTQUE Vrai&#13;
	RetourFonction est un entier&#13;
	RetourFonction=API("USER32", "GetAsyncKeyState", 0x70)&#13;
	&#13;
		IF RetourFonction = 0x8000 THEN&#13;
		Trace("OK")&#13;
		SORTIR&#13;
&#13;
	END&#13;
FIN&#13;
&#13;
Trace("Sortie après &lt;F1&gt;")&#13;
btArrêter..Visible=Faux&#13;
btExécuter..Visible=Vrai&#13;
&#13;
[/code]&#13;
&#13;
1ère question : n'y aurait-il pas une façon plus élégante pour intercepter cette touche &lt;F1&gt; (thread mieux implémenté, service ... ) ; méthode, entre autres, moins gourmande en ressources que la mienne ?&#13;
2e question : cette interception fonctionne très, voire trop bien : j'ai bien l'affichage des Trace("OK") et ("Sortie après &lt;F1&gt;") mais ce F1 appelle AUSSI l'aide de l'application (fenêtre) Windows en cours (Thunderbird, ... y compris l'aide de Windev lui-même ... !?). Comment neutraliser l'appel de F1 suite à l'interception par le thread ?&#13;
NB_z : je tiens à cette touche &lt; F1 &gt; ...&#13;
&#13;
Vous remerciant,&#13;
&#13;
Mike&#13;
&#13;
--&#13;
-&gt; Soyez indulgents : je ne suis pas programmeur !&#13;
-&gt; Merci aux victimes du 'syndrome Coluche' (*) de s'abstenir ...&#13;
(*) « Écrivez nous de quoi vous avez besoin, on vous expliquera comment vous en passer ! » _ Coluche.</description><ttl>30</ttl><generator>WEBDEV</generator><language>fr_FR</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche/read.awp</link><title>intercepter la touche &lt;F1&gt; ... ?</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>Michel</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221746/read.awp</comments><pubDate>6 Nov 2018 15:24:37 Z</pubDate><description>Merci Christian pour ces explications détaillées ; j’étudie tout ça dès que mon activité 'princeps' me laisse un moment ...&#13;
&#13;
P…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221746/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221746/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche/read.awp">intercepter la touche &lt;F1&gt; ... ?</source><title>Re: intercepter la touche &lt;F1&gt; ... ?</title></item><item><author>cmaufroy</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221730/read.awp</comments><pubDate>6 Nov 2018 09:37:55 Z</pubDate><description>Bonjour,&#13;
&#13;
créer une classe vierge, puis créer les procédures indiquées et enfin copier-coller aux emplacement adéquats.&#13;
(Exce…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221730/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221730/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche/read.awp">intercepter la touche &lt;F1&gt; ... ?</source><title>Re: intercepter la touche &lt;F1&gt; ... ?</title></item><item><author>Michel</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221723/read.awp</comments><pubDate>5 Nov 2018 18:28:37 Z</pubDate><description>Merci à tous pour vos réponses.&#13;
Je résume :&#13;
Mon thread 'convient' ; à reformuler peut-être, mais il n'y a pas lieu de le rempl…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221723/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221723/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche/read.awp">intercepter la touche &lt;F1&gt; ... ?</source><title>Re: intercepter la touche &lt;F1&gt; ... ?</title></item><item><author>Cdm98</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221719/read.awp</comments><pubDate>5 Nov 2018 16:30:26 Z</pubDate><description>:o&#13;
&#13;
tout simplement.&#13;
&#13;
Christian, mes respects.</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221719/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221719/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche/read.awp">intercepter la touche &lt;F1&gt; ... ?</source><title>Re: intercepter la touche &lt;F1&gt; ... ?</title></item><item><author>cmaufroy</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221715/read.awp</comments><pubDate>5 Nov 2018 16:06:02 Z</pubDate><description>Bonjour,&#13;
Laisser Windows gérer l'événement en utilisant la fonction "RegisterHotKey"&#13;
&#13;
&#13;
//&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221715/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221715/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche/read.awp">intercepter la touche &lt;F1&gt; ... ?</source><title>Re: intercepter la touche &lt;F1&gt; ... ?</title></item><item><author>Cdm98</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221702/read.awp</comments><pubDate>5 Nov 2018 15:04:16 Z</pubDate><description>THIERRY TILLIER a écrit : &#13;
&gt; Bonjour,&#13;
&gt; &#13;
&gt; //Dans le code initialisation du projet&#13;
&gt; EXTERNE "KeyConst.WL"&#13;
&gt; EXTERNE "WinCo…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221702/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221702/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche/read.awp">intercepter la touche &lt;F1&gt; ... ?</source><title>Re: intercepter la touche &lt;F1&gt; ... ?</title></item><item><author>THIERRY TILLIER</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221695/read.awp</comments><pubDate>5 Nov 2018 12:34:54 Z</pubDate><description>Bonjour,&#13;
&#13;
[code:wl]&#13;
//Dans le code initialisation du projet&#13;
EXTERNE "KeyConst.WL"&#13;
EXTERNE "WinConst.WL"&#13;
[/code]&#13;
&#13;
&#13;
[code…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221695/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221695/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche/read.awp">intercepter la touche &lt;F1&gt; ... ?</source><title>Re: intercepter la touche &lt;F1&gt; ... ?</title></item><item><author>Ndrj</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221691/read.awp</comments><pubDate>5 Nov 2018 11:47:29 Z</pubDate><description>Bonjour,&#13;
&#13;
[code:wl]&#13;
VK_F1 est un entier = 0x70&#13;
nTouche est un entier = VK_F1 // Touche F1&#13;
	// Vérifie si la touche F1 a cha…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221691/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche-221691/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/221680-intercepter-touche/read.awp">intercepter la touche &lt;F1&gt; ... ?</source><title>Re: intercepter la touche &lt;F1&gt; ... ?</title></item></channel></rss>
