Jump to content
Sign in to follow this  

Transparent window causing issue with application it is hovering over

Recommended Posts

HI All -

This transparent application I have is cause a 25-35% decrease in the FPS rate of the application it is sitting over. Even if the Transparent window text is not being changed.

After doing some research I have seen this can be an issue, there are suggestions on about changing the blending type. I am not sure how one would do that with AutoIt or even if that is the correct direction to go.

I have included a code snippet of a transparent window. Any suggestions would be greatly appreciated.

#include <GuiConstantsEx.au3>
#include <Windowsconstants.au3>
#include <GuiRichEdit.au3>
#include <GuiEdit.au3>
 HotKeySet("{ESC}", "On_Exit")


Func MainGui()
    $st1 = $WS_POPUP
    Local $iHorizontal = 1
    Global $hGUIMain = GUICreate("Move Pop-Borderless-Trans", 500, 200, -1, -1, $WS_POPUP, $st2)    ;-31A- (took ; off)
    Global $lblDragMe = GUICtrlCreateLabel("Move", $iHorizontal, 1, 35, 21)
    GUICtrlSetBkColor($lblDragMe, 0xD4D0C8)
    guictrlsetfont($lblDragMe, 10)
    GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKTOP)
    $iHorizontal = $iHorizontal + 35
    Global $btnMenuOpen = GUICtrlCreateButton("Resize", $iHorizontal ,1,35,21)
    GUICtrlSetResizing($btnMenuOpen, $GUI_DOCKLEFT + $GUI_DOCKTOP)
    $iHorizontal = $iHorizontal + 35
    Global $btnGetFile = GUICtrlCreateButton("File", $iHorizontal,1,35,21)
    GUICtrlSetResizing($btnGetFile, $GUI_DOCKLEFT + $GUI_DOCKTOP)
    $iHorizontal = $iHorizontal + 35
    Global $cmbMainOpt = GUICtrlCreateCombo("", $iHorizontal, 1, 70, 21)
    GUICtrlSetResizing($cmbMainOpt, $GUI_DOCKLEFT + $GUI_DOCKTOP)
    $iHorizontal = $iHorizontal + 70
    Global $btnExit = GUICtrlCreateButton("Exit", $iHorizontal,1,35,21)
    GUICtrlSetResizing($btnExit, $GUI_DOCKLEFT + $GUI_DOCKTOP)
    $iHorizontal = $iHorizontal + 35
    Global $hRichEdit = _GUICtrlRichEdit_Create($hGUIMain, "", 1, 23, 498, 166, BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL, $ES_READONLY), $WS_EX_TRANSPARENT) ;-24-
    _GUICtrlEdit_SetReadOnly($hRichEdit, True)
    GUICtrlSetResizing($hRichEdit, $GUI_DOCKLEFT + $GUI_DOCKTOP)
    GUISetBkColor(0xABCDEF, $hGUIMain)
    _WinAPI_SetLayeredWindowAttributes($hGUIMain, 0xABCDEF, 250)

    GUISetState(@SW_SHOW, $hGUIMain) ; Makes GUI Visible

Func On_Exit()

 While 1
        Switch GUIGetMsg()
                _SendMessage($hGUIMain, $WM_SYSCOMMAND, 0xF012, 0)
            Case $btnExit
Edited by MacScript

Share this post

Link to post
Share on other sites

I can not reproduce your issue, maybe because my graphics card is too powerful. The only noticable FPS drops I get is when that GUI is the currently active window (input focus), but this behavior comes from the OS itself and also happens when you activate any other window than the 2D/3D application.

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  

  • Create New...