Jump to content

Flickering?


lyledg
 Share

Recommended Posts

Just a quick question..

I have created a GUI that has various functions like Checkboxes , input boxes etc..

Question I have is why does the GUI flicker so much when a mouse is dragged over the GUI.. Is there a way to get rid of it or at least minimize the effect of this?

Thanks

:lmao:

Link to comment
Share on other sites

Just a quick question..

I have created a GUI that has various functions like Checkboxes , input boxes etc..

Question I have is why does the GUI flicker so much when a mouse is dragged over the GUI.. Is there a way to get rid of it or at least minimize the effect of this?

Thanks

:lmao:

<{POST_SNAPBACK}>

can you post an example so I can look at? o:)
Link to comment
Share on other sites

I don't mean to hijack this thread, but I have a similar situation with my GUI.

The code causes the entire screen to flicker when switching GUI views.

I know...I know, bad coding habits with declaring Globals within functions, but hey, I'm lazy...

This is just a concept GUI that I'll be putting code into eventually.

#include <GUIConstants.au3>
Dim $hWnd_PrimaryGUI, $hWnd_BanListGUI, $hWnd_ConfigGUI, $iWndo_Location

PrimaryGUI()

While 1; primary data loop
   Sleep(10)
   $msg = GUIGetMsg()
   Select
     ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      Case $msg = $GUI_EVENT_CLOSE Or $msg = $button_exit
         Exit
        ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      Case $msg = $button_banlist
         $iWndo_Location = WinGetPos($hWnd_PrimaryGUI)
         GUISetState(@SW_HIDE, $hWnd_PrimaryGUI)
         If $hWnd_BanListGUI = "" Then
            BanListGUI($iWndo_Location[0], $iWndo_Location[1])
         Else
            WinMove($hWnd_BanListGUI, "", $iWndo_Location[0], $iWndo_Location[1])
            GUISetState(@SW_SHOW, $hWnd_BanListGUI)
            MsgBox(0, "Banlist", "Insert Banlist GUI here")
         EndIf
         While 1; BanList Data Loop
            ExitLoop
         WEnd
         $iWndo_Location = WinGetPos($hWnd_BanListGUI)
         GUISetState(@SW_HIDE, $hWnd_BanListGUI)
         WinMove($hWnd_PrimaryGUI, "", $iWndo_Location[0], $iWndo_Location[1])
         GUISetState(@SW_SHOW, $hWnd_PrimaryGUI)
        ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      Case $msg = $button_config
         $iWndo_Location = WinGetPos($hWnd_PrimaryGUI)
         GUISetState(@SW_HIDE, $hWnd_PrimaryGUI)
         If $hWnd_ConfigGUI = "" Then
            ConfigGUI($iWndo_Location[0], $iWndo_Location[1])
         Else
            WinMove($hWnd_ConfigGUI, "", $iWndo_Location[0], $iWndo_Location[1])
            GUISetState(@SW_SHOW, $hWnd_ConfigGUI)
            MsgBox(0, "Configuration", "Config GUI goes here")
         EndIf
         While 1; Config Data Loop
            ExitLoop
         WEnd
         $iWndo_Location = WinGetPos($hWnd_ConfigGUI)
         GUISetState(@SW_HIDE, $hWnd_ConfigGUI)
         WinMove($hWnd_PrimaryGUI, "", $iWndo_Location[0], $iWndo_Location[1])
         GUISetState(@SW_SHOW, $hWnd_PrimaryGUI)
   EndSelect
WEnd


Func PrimaryGUI()
   Global $hWnd_PrimaryGUI = GUICreate("Coaster Leech", 231, 341) ; primary GUI window.
   GUISetBkColor(0x484b80)
   GUICtrlCreateLabel("", 10, 10, 211, 60)
   GUICtrlSetBkColor(-1, 0xffff00); yellow.  Placeholder for the image
   $label_white = GUICtrlCreateLabel("", 10, 80, 211, 251)
   GUICtrlSetBkColor($label_white, 0xffffff); white
   GUICtrlSetState($label_white, $GUI_DISABLE)
   Global $button_banlist = GUICtrlCreateButton("View &Bans", 15, 85, 65, 20)
   Global $button_config = GUICtrlCreateButton("&Config", 151, 85, 65, 20)
   Global $button_exit = GUICtrlCreateButton("E&xit", 83, 306, 65, 20)
   GUISetState()
EndFunc  ;==>PrimaryGUI

Func BanListGUI($x = -1, $y = -1)
   Global $hWnd_BanListGUI = GUICreate("Coaster Leech - Ban List", 231, 341, $x, $y) ; Ban List GUI window.
   GUISetBkColor(0x484b80); default colour
   GUICtrlCreateLabel("", 10, 10, 211, 60)
   GUICtrlSetBkColor(-1, 0xffff00); yellow.  Placeholder for the image
   $label_white = GUICtrlCreateLabel("", 10, 80, 211, 251)
   GUICtrlSetBkColor($label_white, 0xffffff); white
   GUICtrlSetState($label_white, $GUI_DISABLE)
   Global $button_addban = GUICtrlCreateButton("&Add Ban", 15, 85, 65, 20)
   Global $button_clearlist = GUICtrlCreateButton("&Clear List", 151, 85, 65, 20)
   Global $button_exitban = GUICtrlCreateButton("E&xit", 83, 306, 65, 20)
   GUISetState()
   MsgBox(0, "Banlist", "Insert Banlist GUI here")
EndFunc  ;==>BanListGUI

Func ConfigGUI($x = -1, $y = -1)
   Global $hWnd_ConfigGUI = GUICreate("Coaster Leech - Config", 231, 341, $x, $y) ; primary GUI window.
   GUISetBkColor(0x484b80); default colour
   GUICtrlCreateLabel("", 10, 10, 211, 60)
   GUICtrlSetBkColor(-1, 0xffff00); yellow.  Placeholder for the image
   $label_white = GUICtrlCreateLabel("", 10, 80, 211, 251)
   GUICtrlSetBkColor($label_white, 0xffffff); white
   GUICtrlSetState($label_white, $GUI_DISABLE)
   Global $button_folder = GUICtrlCreateButton("&Folder", 15, 85, 65, 20)
   Global $button_login = GUICtrlCreateButton("&Login/Pass", 151, 85, 65, 20)
   Global $button_exitconfig = GUICtrlCreateButton("E&xit", 83, 306, 65, 20)
   GUISetState()
   MsgBox(0, "Configuration", "Config GUI goes here")
EndFunc  ;==>ConfigGUI

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

BlueD,

I don't see your code flicker when I test. However, I did have a problem creating an input box that would only appear once a checkbox was checked. Upon checking the checkbox, the input box would appear, but it would flicker.

The problem was that the script was looping and recreating the box over and over again, because I hadn't done anything to stop it from looking at the checkbox if it was already checked.

This may not be the problem for either of you, but it may help.

Link to comment
Share on other sites

BlueD,

  I don't see your code flicker when I test.  However, I did have a problem creating an input box that would only appear once a checkbox was checked.  Upon checking the checkbox, the input box would appear, but it would flicker.

  The problem was that the script was looping and recreating the box over and over again, because I hadn't done anything to stop it from looking at the checkbox if it was already checked.

   

  This may not be the problem for either of you, but it may help.

<{POST_SNAPBACK}>

Ok, must be my monitor then. *sigh* Thanks.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...