Results 1 to 11 of 11

Thread: How to show Window Task Manager

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2005
    Posts
    167

    Question How to show Window Task Manager

    How can I use VB Code to show Window Task Manager? Thanks.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: How to show Window Task Manager

    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Command1_Click()
    4.     Shell "taskmgr.exe", vbNormalFocus
    5. End Sub
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    Re: How to show Window Task Manager

    When you have received an answer to your question, please mark it as Resolved using the Thread Tools menu.
    CS

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Oct 2005
    Posts
    167

    Question Re: How to show Window Task Manager

    I do not have privilege to show Windows Task manager(lock my administrator). But sometime my computer got stuck so I want to end process some applications. Is there any API function to do show Windows Task Manager? Thanks.

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: How to show Window Task Manager

    You can write code to terminate a process without using taskmanager. Search for "Terminate + Process" on the forums. I have some code as well as others.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: How to show Window Task Manager

    VB Code:
    1. Private Sub Command1_Click()
    2.     TerminateProcess ("WINWORD.EXE")
    3. End Sub
    4.  
    5. Private Sub TerminateProcess(app_exe As String)
    6.     Dim Process As Variant
    7.     For Each Process In GetObject("winmgmts:").ExecQuery("Select Name from Win32_Process Where Name = '" & app_exe & "'")
    8.         Process.Terminate
    9.     Next
    10. End Sub

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: How to show Window Task Manager

    But if his system is locked down then odds are that WMI is also disabled.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  8. #8
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: How to show Window Task Manager

    True ... then he shouldnt be messing with it

  9. #9
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: How to show Window Task Manager

    True but only after we know the truth.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  10. #10
    Junior Member a_rat's Avatar
    Join Date
    Jun 2006
    Location
    New Zealand
    Posts
    25

    Re: How to show Window Task Manager

    also open a command prompt and type
    taskkill /?
    for the help on how to use taskkill, usualy something like
    TASKKILL /f /im Progname.exe
    dont konw if youll have the privs for this either, but worth a try

  11. #11
    Junior Member a_rat's Avatar
    Join Date
    Jun 2006
    Location
    New Zealand
    Posts
    25

    Re: How to show Window Task Manager

    sorry,
    in my above it is of course a shell command eg

    SHELL("TASKKILL /f /im Progname.exe")
    dont for get to put double quotes arround the bits in the brakets, or put this string into a variable (you send a string to the SHELL)

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