Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

minimising

Options
  • 04-05-2005 1:30pm
    #1
    Closed Accounts Posts: 154 ✭✭


    does anyone know a way in visual basic or c++ to check if an exe file is minimised? not the program itself, which is just me.windowState=vbMinimized in visual basic, a separate process

    i spend a while googling but i could only find huge programs that have the ability built into them somewhere. cba sorting though 5000 lines of code for the 5 (hopefully) that i need


Comments

  • Registered Users Posts: 6,508 ✭✭✭daymobrew


    The Win32 API has two functions which will probably be useful: FindWindow() and GetWindowInfo().
    Basically, you have to know the window class and pass that to FindWindow (or FindWindowEx). The returned window handle is passed to GetWindowInfo and the returned WINDOWINFO structure contains a member called dwStyle from which you can determine if it is minimised.


  • Registered Users Posts: 131 ✭✭theexis


    Presuming you have the window handle, you could also use IsIconic.


  • Closed Accounts Posts: 154 ✭✭smorton


    thanks lads but it all seemed to complicated. the program i wanted to check on was a temperature monitor program for my mobo. i wanted to shut down the computer if it overheated when i left it downloading. it uniminimises and beeps if the comp overheats. i realised the program takes itself out of the system tray when it uniminimises and it was much easier for my program to check for that than to check for it unminimising. thanks tho. good stuff


Advertisement