Jump to content

Set Winstate of minimized win to become maximized when clicked


Recommended Posts

I want to put a win into a minimized icon, but set it in a way that when clicked it will bring up maximized, all of this in background without seeing the operation.

i.e.

I launch Excel sheet in hidden mode, set the win to maximize, then minimize: when I will click on the taskbar icon it will bring maximized=ok.

BUT when performing max-min there is a "flash" on the screen that is disturbing, I would like to obtain this without seeing anything on the screen.

Is it possible?

I found a workaround setting the active window ontop and this way it works (IF there is already a win maximized that cover all the screen...), but it's not ideal...

#include <Excel.au3>

local $activeWin = WinGetHandle("[ACTIVE]")
;WinSetOnTop( $activeWin,"", 1)  ; this way it works...

Global $oExcel = _Excel_Open(false,false)
$oWB = _Excel_BookOpen($oExcel, @ScriptDir & "\" & "myFile.xlsx")

WinSetState("myFile.xlsx","", @SW_MAXIMIZE)
WinSetState("myFile.xlsx","", @SW_MINIMIZE)
$oExcel.Visible = true;

;WinSetOnTop( $activeWin ,"", 0)

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...