Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6928681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:13:16+00:00 2026-05-27T11:13:16+00:00

If you have ever noticed in the Task Manager, when you right-click on the

  • 0

If you have ever noticed in the Task Manager, when you right-click on the running task, you have many options which include ‘Minimize’ and ‘Maximize’. Is there anyway to do achieve this in vb?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:13:16+00:00Added an answer on May 27, 2026 at 11:13 am

    Here is an example of the code you are looking for. It will loop through all the active processes and minimize all the windows.

    In your app you will probably want to use something like Process.GetProcessesByName to find the specific window you want to manipulate.

    Imports System.Runtime.InteropServices
    
    Module ManipulateWindows
    
        Const SW_HIDE As Integer = 0
        Const SW_RESTORE As Integer = 1
        Const SW_MINIMIZE As Integer = 2
        Const SW_MAXIMIZE As Integer = 3
    
        <DllImport("User32")> _
        Private Function ShowWindow(ByVal hwnd As Integer, ByVal nCmdShow As Integer) As Integer
        End Function
    
        Public Sub Main()
    
            'iterate through all the open processes.
            For Each p As Process In Process.GetProcesses    
    
                'Get the Window Handle
                Dim hWnd as integer = CType(p.MainWindowHandle, Integer)
    
                'Write out the title of the main window for the process.
                System.Console.WriteLine(p.MainWindowTitle)
    
                'Minimize the Window
                ShowWindow(hWnd, SW_MINIMIZE)
            Next p    
        End Sub    
    End Module
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

have you ever noticed how in gmail, as the emails are updated in your
I noticed that doxygen uses the graphviz library for creating diagrams. Have you ever
Have you ever seen any of there error messages? -- SQL Server 2000 Could
Have you ever obfuscated your code before? Are there ever legitimate reasons to do
Curious if anyone ever noticed this, but I have a WYSIWYG that users occassionally
Have you ever noticed (not only in Vim) that the cursor never change position
I'm currently maintaining an application and noticed that many of the objects that have
What is the most evil or dangerous code fragment you have ever seen in
Have you ever tried this before? static void Main(string[] args) { int x =
Have you ever worked on a (full-time) project where using Agile methodologies actually allowed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.