Jump to content

GUI Flickering when using _IENavigate()


bundyxc
 Share

Recommended Posts

I'm not sure why, but _IENavigate() is screwing with my entire GUI, and making my progress bar disappear, as well as my buttons to flicker. It's very strange. It doesn't flicker until you _IENavigate(). Any ideas on a fix? Some source code below:

#include <GUIConstants.au3>
#include <IE.au3>
#Include <Constants.au3>
#include <GUIConstantsEx.au3>
#include <String.au3>
#include <INet.au3>
#RequireAdmin
#NoTrayIcon



Opt("TrayMenuMode",1)
$text = 'Ready'
$progress = 0
$email = "mail@example.com"
$password = "*****"
$status = "statusss"
$mood = "Great"


$GUI = GUICreate("PureStatus - PureAdds.com", 528, 210) ; 528, 210
$browser = ObjCreate("Shell.Explorer.2")
$browser_control = GUICtrlCreateObj($browser, 1000, 1000, 1, 1)
$log = GUICtrlCreateEdit($text, 16, 10, 240, 150, 0x0800)
$start_stop_button = GUICtrlCreateButton("Start", 264, 10, 240, 30)
$accounts_button = GUICtrlCreateButton("Accounts", 264, 50, 240, 30)
$statuses_button = GUICtrlCreateButton("Statuses", 264, 90, 240, 30)
$settings_button = GUICtrlCreateButton("Settings", 264, 130, 240, 30)
$progressbar = GuiCtrlCreateProgress(16, 170, 496, 30)
GuiCtrlSetData($progressbar, $progress)

GUISetState()

        _IENavigate($browser, "http://www.myspace.com/index.cfm?fuseaction=signout")
        _IELoadWait($browser)
        _IENavigate($browser, "http://www.myspace.com/index.cfm?fuseaction=signout")
        _IELoadWait($browser)
        _IENavigate($browser, "http://www.myspace.com/index.cfm?fuseaction=signout")
        _IELoadWait($browser)
        _IENavigate($browser, "http://www.myspace.com/index.cfm?fuseaction=signout")
        _IELoadWait($browser)
        _IENavigate($browser, "http://www.myspace.com/index.cfm?fuseaction=signout")
        _IELoadWait($browser)
Edited by bundyxc
Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^
Link to comment
Share on other sites

Try this:

If Not IsDeclared("WS_EX_COMPOSITION") Then Global Const $WS_EX_COMPOSITION = 0x02000000

; ...
$GUI = GUICreate("PureStatus - PureAdds.com", 528, 210, -1, -1, -1, 0x02000000)

; ...

You can also make the browser container control invisible, thus the window will not try to redraw it, just guessing.

Interesting! I saw that somewhere already.

http://msdn.microsoft.com/en-us/library/ms632680%28VS.85%29.aspx

WS_EX_COMPOSITEDWindows XP: Paints all descendants of a window in bottom-to-top painting order using double-buffering. For more information, see Remarks. This cannot be used if the window has a class style of either CS_OWNDC or CS_CLASSDC.

Link to comment
Share on other sites

Yeah, I've read it as well and I think that it's a bit vague because it seems to work and AI's class contains this style, you can verify that using WinSpy++.

Edit: After further research it seems it's possible because both WS_CLIPCHILDREN and WS_EX_COMPOSITED are 0x02000000 but nothing states that you can't use WS_CLIPCHILDREN with a class style of CS_OWNDC so it seems to be better for ActiveX control's parent window or the control itself to use WS_CLIPCHILDREN instead.

#include <WindowsConstants.au3> 
; ...

$GUI = GUICreate("PureStatus - PureAdds.com", 528, 260) ; 528, 210
$aStyle = GUIGetStyle()
GUISetStyle(BitOR($aStyle[0], $WS_CLIPCHILDREN))
Edited by Authenticity
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...