Sign in to follow this  
Followers 0
Mingre

How to change the order of an AutoIt GUI on taskbar?

3 posts in this topic

Say I have 3 windows opened, including an AutoIt GUI. Can I change its taskbar position without the window's getting the focus?

Thanks!

Share this post


Link to post
Share on other sites



Here we go

#include <WinAPI.au3>
#include <Constants.au3>

_Main()

Func _Main()

;Placed At the Bottom - Minimize everything then find it
$hGUI_1 = GUICreate("1st Win")
_WinAPI_SetWindowPos($hGUI_1, $HWND_BOTTOM, 10, 10, 600, 600, BitOR($SWP_SHOWWINDOW, $SWP_NOACTIVATE))
_WaitForClose()

;Placed at the Top but goes to back when another win is activated
$hGUI_2 = GUICreate("2nd Win")
_WinAPI_SetWindowPos($hGUI_2, $HWND_NOTOPMOST, 10, 10, 600, 600, BitOR($SWP_SHOWWINDOW, $SWP_NOACTIVATE))
_WaitForClose()

;Placed at the Top but goes to back when another win is activated - same as the previous
$hGUI_3 = GUICreate("3rd Win")
_WinAPI_SetWindowPos($hGUI_3, $HWND_TOP, 10, 10, 600, 600, BitOR($SWP_SHOWWINDOW, $SWP_NOACTIVATE))
_WaitForClose()

;Placed at the Top and doesn't go back when any other window is activated, always stays on the Top.
$hGUI_4 = GUICreate("4th Win")
_WinAPI_SetWindowPos($hGUI_4, $HWND_TOPMOST, 10, 10, 600, 600, BitOR($SWP_SHOWWINDOW, $SWP_NOACTIVATE))
_WaitForClose()

;There is a slight difference in the 2nd and 3rd GUI
;Look here to get more information http://blogs.msdn.com/b/oldnewthing/archive/2005/11/21/495246.aspx
EndFunc   ;==>_Main

Func _WaitForClose()

While GUIGetMsg() <> -3
Sleep(10)
WEnd
GUIDelete()

EndFunc   ;==>_WaitForClose
Regards :)

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hello PhoenixXL,

I apologize if I did not get my message across. What I wanted is to move the taskbar position from first appearing to the rightmost of the taskbar to a "more left" position (please see the attached image file).

Thanks!

EDIT: Forgot to attach the file

post-64906-0-08213300-1365825795_thumb.j

Edited by Mingre

Share this post


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
Sign in to follow this  
Followers 0