Advertisement
Java_Volume1 Windows API Call/ Explanation #93451

Close Any Application

This code will Close any application based on its windows caption

AI

Résumé par IA: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Code source
original-source
Public Function CloseApplication(byVal sAppCaption As String) As Boolean
  Dim lHwnd As Long
  Dim lRetVal As Long
  
  lHwnd = FindWindow(vbNullString, sAppCaption)
  If lHwnd <> 0 Then
    lRetVal = PostMessage(lHwnd, WM_CLOSE, 0&, 0&)
  End If
End Function
Upload
Commentaires originaux (3)
Récupéré via Wayback Machine