Jump to content

Search the Community

Showing results for tags 'topmost'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 6 results

  1. I'm creating an alternative to Windows' alt-tab menu, and I'm encountering issues with WinList as it DOES NOT provide the correct order of recently opened or activated windows. While WinList normally respects the z-order, this is not the case when topmost windows are present (mentioned here). Here is an example showing what I mean: #include <WinAPI.au3> #include <WindowsConstants.au3> Run('notepad.exe') Run('calc.exe') Local $sNotepadTitle = 'Untitled - Notepad' Local $sCalculatorTitle = 'Calculator' WinWait($sNotepadTitle) WinWait($sCalculatorTitle) WinSetOnTop($sCalculatorTitle, '', $WINDOWS_ONTOP) WinActivate($sNotepadTitle) ConsoleWrite('Active window: ' & WinGetTitle('[ACTIVE]') & @CRLF) ConsoleWrite('First visible window from WinList: ' & getTopWindow() & @CRLF) Func getTopWindow() Local $aList = WinList() For $i = 1 To $aList[0][0] $iExStyle = _WinAPI_GetWindowLong($aList[$i][1], $GWL_EXSTYLE) ; get the extended style of each Window If Not BitAND($iExStyle, $WS_EX_TOOLWINDOW) And _ ; Search for windows without $WS_EX_TOOLWINDOW extended style BitAND(WinGetState($aList[$i][1]), $WIN_STATE_VISIBLE) Then ; And only visible windows Return $aList[$i][0] EndIf Next EndFunc Explain: Activating Notepad should precede Calculator in WinList. However, due to $WS_EX_TOPMOST, Calculator takes precedence over any non-$WS_EX_TOPMOST windows in the WinList array. I've tried _WinAPI_EnumWindows, _WinAPI_EnumWindowsTop, both yield the same result as WinList. Are there any other APIs or methods to retrieve a list of recently activated windows, regardless of topmost windows (similar to Windows' alt-tab menu)?
  2. Hi guys, I know the function WinSetOnTop and also the extended style $WS_EX_TOPMOST which you can give while creating a GUI, but... How do I check if a window has this set, aka AlwaysOnTop? My goal is to have a little script waiting for a hotkey to be pressed and then toggle the $WS_EX_TOPMOST of the [ACTIVE] window. In order to do that I have to be able to retrieve that flag to do a bitwise XOR on it, just don't know how to query it. thx in advance
  3. Hello, I'm trying to make cursor for my program, and I need to make it on top but not active when pressed on start menu, taskbar or etc. (cursor appears behind taskbar/start menu). Somebody could help me with this problem? ; A bit of my script #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> #include <GDIPlus.au3> #include <GuiListBox.au3> Global $Bitmap_Mouse_Pic_Dir = @ScriptDir&"\Cursor.png" Global $Bitmap_Mouse_Pic = _GetWHI($Bitmap_Mouse_Pic_Dir) Global $Bitmap_Mouse_PicSel_Dir = @ScriptDir&"\Selection.png" Global $Bitmap_Mouse_PicSel = _GetWHI($Bitmap_Mouse_PicSel_Dir) Global $Bitmap_Mouse_Opt = 255 ; ... For $i = 0 to 0 $GP_guicur[$i] = GUICreate("GP Cursor", 64, 64, $POS[$i][0], $POS[$i][1], $WS_POPUP, $WS_EX_LAYERED, $GUI) WinSetOnTop($GP_curgui[$i],"",1) SetBitmap($GP_curgui[$i], $Bitmap_Mouse_Pic, $Bitmap_Mouse_Opt) GUISetState(@SW_SHOW) Next ; ... For ; ... Sleep(1000) MouseClick("left",5,@DesktopHeight-5) ; ... Next Exit ;______________________________________________________________________; ; Original program by Ejoc ; ; Improved by Adam1213 (autoit 3.2 compatiblity + improved labels; ;______________________________________________________________________; ; $sImage = Path to your image ; Returns = Array[3] ; $Array[0] = Width ; $Array[1] = Height ; $Array[2] = handle to a HBITMAP ; when the image is no longer needed use _WinAPI_DeleteObject($Array[2]) Func _GetWHI($sImage) Local $hImage, $aBitmap[3] _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile($sImage) $aBitmap[0] = _GDIPlus_ImageGetWidth($hImage) $aBitmap[1] = _GDIPlus_ImageGetHeight($hImage) $aBitmap[2] = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() Return $aBitmap EndFunc ;==>_GetWHI ; I changed this so I could shutdown gdiplus once an image has been loaded by _GetWHI() ; just pass it the array returned by _GetWHI() Func SetBitmap($hGUI, $aBitmap, $iOpacity) Local Const $AC_SRC_ALPHA = 1 Local $hScrDC, $hMemDC, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend $hScrDC = _WinAPI_GetDC(0) $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC) $hOld = _WinAPI_SelectObject($hMemDC, $aBitmap[2]) $tSize = DllStructCreate($tagSIZE) $pSize = DllStructGetPtr($tSize) DllStructSetData($tSize, "X", $aBitmap[0]) DllStructSetData($tSize, "Y", $aBitmap[1]) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, "Alpha", $iOpacity) DllStructSetData($tBlend, "Format", $AC_SRC_ALPHA) _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA) _WinAPI_ReleaseDC(0, $hScrDC) _WinAPI_SelectObject($hMemDC, $hOld) _WinAPI_DeleteDC($hMemDC) EndFunc ;==>SetBitmap Thanks
  4. Hi, I've searched but can only find posts from people with the opposite problem (asking how to get their GUI to display on top of a full-screen app, usually a game. I've created a toolbar which I use in a work environment, creating the GUI with the following styles; $hwnd = GUICreate($title, $toolbarWidth, $height, $left, $top, $WS_POPUPWINDOW, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) I want it to have a TOPMOST style as it's supposed to behave like the Windows taskbar (which it does in all but one scenario). If I start a full-screen RDP session, I can still see my toolbar and have to close it. Is there a way I can make it appear on top of all windows *except* full-screen apps (in the same way the taskbar allows full-screen apps on top of it)? Thanks in advance. Val.
  5. I'm trying to make a GUI window that I have created as the topmost window even when other programs pop up such as AIM, notepad, etc. I've tried GUISetState(@SW_SHOWNORMAL, $GUIhandle), GUICtrlSetStyle($GUIhandle,, $WS_EX_TOPMOST). None of these seem to work or I must be doing something a little off; I've got these inside a loop that constantly runs when the GUI window is running; any help would be much appreciated. P.S. Thank you Melba.
  6. Hi, I have a child GUI with the $WS_CHILD style inside a main gui, the problem is if there is ctrls (which are on the main GUI) behind the child GUI, they are visible, meaning that they are topmost of the child GUI. I there a solution to this, like making the child GUI on top ? P.S : I'm off to use the _WinAPI_SetParent. Br, FireFox.
×
×
  • Create New...