Results 1 to 3 of 3

Thread: Must KILL Winword.exe

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 1999
    Location
    Scarsdale, NY
    Posts
    26

    Post

    Hi!!!

    My Windows NT Task Manager is driving me crazy. Using VB, how can I end Winword.exe application from my "Processes" tab? The "Processes" tab doesn't recognize the word "Quit". "Applications" tab does not show that the application is running at all.

    Please tell me what to do if you can!

    Thank you!

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Try:
    Code:
    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
    Private Const WM_CLOSE = &H10
    
    Private Sub Command1_Click()
        'OpusApp is the Classname of MSWord
        Call SendMessage(FindWindow("OpusApp", vbNullString), WM_CLOSE, 0&, ByVal 0&)
    End Sub
    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 1999
    Location
    Scarsdale, NY
    Posts
    26

    Post

    Aaron, thanks so much!
    Is there anything you don't know?
    You've helped me on several ocasions already.
    Thanks again.

    Olga.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width