Détecte 1e nouvelle fenetre

khadidjamina Messages postés 8 Date d'inscription lundi 18 février 2008 Statut Membre Dernière intervention 13 février 2010 - 26 avril 2008 à 10:30
khadidjamina Messages postés 8 Date d'inscription lundi 18 février 2008 Statut Membre Dernière intervention 13 février 2010 - 26 avril 2008 à 15:27
comment je détecte l'ouverture d'une nouvelle fenetre windows pour recupérer son tittre et son URL, en parallèle de l'execution de mon application.
merci.

2 réponses

bubbathemaster Messages postés 339 Date d'inscription dimanche 26 janvier 2003 Statut Membre Dernière intervention 25 mars 2009 4
26 avril 2008 à 14:53
http://www.vbfrance.com/codes/LISTER-FENETRES-ACTIVES_2312.aspx

ca devrait t'aider. Je n'ai pas regardé comment ca marche, mais je suppose que c'est à base d'API GetWindow
0
khadidjamina Messages postés 8 Date d'inscription lundi 18 février 2008 Statut Membre Dernière intervention 13 février 2010
26 avril 2008 à 15:27
je sais que c'est à base API,
static string f()
        {
            int length = GetWindowTextLength(GetForegroundWindow());
            StringBuilder sb = new StringBuilder(length + 1);
            GetWindowText(GetForegroundWindow(), sb, sb.Capacity);
            return sb.ToString();
        }

elle donne le nom de la fenetre qui es en font d'écran, mais je veux le déclencher qd l'utilisateur ouvre une autre fenetre aprés que je lance mon applicatio.
merci.
0
Rejoignez-nous