Les Snippets

Connexion

Fermer une application identifiée par son titre

Niveau requis pour utiliser/comprendre cette source : 1 ( Débutant )
Créé le 21/03/2006 17:28:12 et initié par PCPT [Liste]
Date de mise à jour : 27/03/2006 17:53:38
Vue : 10840
Catégorie(s) : API
Langages dispo pour ce code :
- VB6, VBA
- C# 1.x, C# 2.x
- C# 1.x, C# 2.x
- VB 2005, VB.NET 1.x
- Delphi 5
- Voir tous les langages pour ce code snippet



Langage : VB6 , VBA
Date ajout : 21/03/2006
Posté par PCPT [Liste]
Option Explicit 
  

' Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _          (ByVal lpClassName As StringByVal lpWindowName As StringAs Long  ' Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" _          (ByVal hwnd As LongByVal wMsg As LongByVal wParam As Long, lParam As Any) As Long  ' Private Const WM_CLOSE      As Long = &H10  Private Const HTCAPTION     As Long = 2&  ' Private Const MON_TITRE     As String = "Sans titre - Bloc-notes"  ' ' Private Sub Command1_Click()      Dim lHwnd As Long      lHwnd = FindWindow(vbNullString, MON_TITRE)      If lHwnd = 0 Then          MsgBox "Titre non-trouvé!!!"      Else          Call SendMessage(lHwnd, WM_CLOSE, HTCAPTION, ByVal 0&)      End If  End Sub


Snippets en rapport avec : Application, Fermer



Codes sources en rapport avec : Application, Fermer

{C# / C#.NET} LANCEUR POUR WORLD OF WARCRAFT
World of Warcraft (Wow) est un MMORPG. Cette application permet à Wow de se connecter à différents ...

{Visual Basic, VB6, VB.NET, VB 2005} STANDARISATION D'APPLICATIONS
Cet utilitaire permet d'exécuter les applications que vous utilisez le plus souvent directement depu...

{Flash} DESSIN APPLICATION AS3
une base pour une application de dessin code action scripte 3 avec redimensionnement, palette & ta...

{JAVA / J2EE} JEU "PRO_REBAND" INTERFACE DE JEU ASSEZ INTERRESSANTE, JEU SIMPLE ET EFFICACE
ce jeu est un peu interressant..... Vous le peut etre sous un autre nom, moi je l'ai oublier. En fa...

{JAVA / J2EE} TIMER POUR STOPPER UN PROGRAMME .EXE
Et enfin la version 2.0 !! A mes début en Java, je ne trouvais pas de réelle utilité à ce lan...

{C / C++ / C++.NET} BOOK MON CORRECTEUR EN WIN32
Voici mon correcteur de pontuation en version win32. Il y a un fichier config.cfg pour modifier des...

{PHP} MYRSSREADER :: APPLICATION WEB2
DEMO SUR : http://rss.amezghal.com | =================================== Salut, MyRSS est une app...

{C / C++ / C++.NET} RANGESOURIS
c'est un petit code qui a pour bute de ranger la souris quand l'utilisateur ne la bouge pas pendant ...

{Visual Basic, VB6, VB.NET, VB 2005} HANDLISTER
Ce petit programme permet de surveiller les applications qui sont démarrées ou arrêtées et d'écrire ...

{Python} OPTI2 OU COMMENT OPTIMISER WINDOWS XP ET/2000 EN QUELQUES CLICS
Opti2 est un soft d'optimisation de windows xp et/ou 2000. Il comprend une vingtaine d'optimisati...