Sign in to follow this  
Followers 0
Aipion

Lable flicker

9 posts in this topic

#1 ·  Posted (edited)

I am making a Setup Builder program which makes setups to install files but the label keeps on flickering in my Setups when the setup trys to update the title and the sub title.

It is not lunched yet but my site is www.antop.co.uk.

Edited by Antop

Share this post


Link to post
Share on other sites



Antop,

I would imagine that you are trying to update the label too frequently - that is the most common reason for flickering. You need to test if the label is already showing the correct value and only update if it is not. :(

But please post the code you are using - we will be able to give you a better answer than. :graduated:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Indeed we need some of the code to solve the problem.. but here a replacement of GUICtrlSetData

Func _GUICtrlSetData($iCtrlID, $sData)
    If GUICtrlRead($iCtrlID, 1) <> $sData Then GUICtrlSetData($iCtrlID, $sData)
EndFunc   ;==>_GUICtrlSetData

Best regards,

Emiel


Best regards,Emiel Wieldraaijer

Share this post


Link to post
Share on other sites

Global $SetupTempFolder = _TempFile(-1,'','',10)
DirCreate($SetupTempFolder)
Global $GuiName = 'Your Product Setup'
Global $Company = 'Your Company'
Global $ProductName = 'Your Product'
Global $ProductVersion = '1.2.0.0'
Global $ProjectSize = '$ProSize'
Global $Intalltxt = @ProgramFilesDir & '\' & $ProductName & '\' 
Global $InstallFolder = @ProgramFilesDir & '\' & $ProductName & '\' 
Global $ShortcutFolder = $Company & "\" & $ProductName
Global $pictop,$lab1,$lab2,$picside,$gui,$UseBKWin = 0
FileInstall ( 'B:\Users\Antonio\Desktop\Plugins\7-zip32.dll',$SetupTempFolder&'\7-zip32.dll')
Global $toping = $SetupTempFolder&'\Install top.jpg'
 FileInstall('B:\Users\Antonio\Desktop\install top.jpg',$SetupTempFolder&'\install top.jpg',1)
Global $sideing = $SetupTempFolder&'\Install boxside.jpg'
FileInstall('B:\Users\Antonio\Desktop\install boxside.jpg',$SetupTempFolder&'\install boxside.jpg',1)

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GuiButton.au3>
#include <ButtonConstants.au3>
#include <ProgressConstants.au3>
#Include <Misc.au3>
#Include <GuiEdit.au3>
#include <StaticConstants.au3> 
#include <IE.au3>
#include <File.au3>
#NoTrayIcon

Opt('MustDeclareVars', 0)
Requirements()
InstallerStart()


Func InstallerStart()


$gui = GUICreate($GuiName, 494, 350,-1,-1,-1, $WS_EX_COMPOSITED)


$picside = GUICtrlCreatePic($sideing, 0, 0, 187, 301)
$pictop = GUICtrlCreatePic($toping, 0, 0, 494, 63)
GUICtrlCreateLabel("", 2, 300, 492, 1, 0x10)
GUICtrlSetState($picside,$GUI_HIDE)
GUICtrlSetState($pictop,$GUI_HIDE)
GUISetBkColor(0xfffffff)
$lab1 = GUICtrlCreateLabel("", 10, 10, 300, 20)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GuiCtrlSetState(-1,$GUI_ONTOP)
$font = "Arial"
GUICtrlSetFont($lab1,9, 900, 1,$font)
GUICtrlSetState(-1,$GUI_HIDE)
$lab2 = GUICtrlCreateLabel("",20, 30, 400, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GuiCtrlSetState(-1,$GUI_ONTOP)
GUICtrlSetState(-1,$GUI_HIDE)

   
instart()

Welcome0()

EndFunc
#AutoIt3Wrapper_OutFile=B:\Users\Antonio\Desktop\Temp\Setup.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_res_requestedExecutionLevel=requireAdministrator
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=y
#AutoIt3Wrapper_Aut2exe=B:\Users\Antonio\Desktop\Plugins\AutoIt\Aut2Exe\Aut2exe.exe
://////=__=
://////=__=
://////=__=...
#AutoIt3Wrapper_Res_ProductVersion=1.2.0.0
://////=__=
#AutoIt3Wrapper_Res_LegalCopyright=Copyright © 2010 Your Company
#AutoIt3Wrapper_Res_Description=Setup Application
://////=__=&-
://////=__=.=www.antop.co.uk)
#AutoIt3Wrapper_Res_Fileversion=1.2.0.0
#AutoIt3Wrapper_Res_Comment=Created with Setup Studio 4.9 (www.antop.co.uk)
#AutoIt3Wrapper_Icon=B:\Users\Antonio\Desktop\Icons\Setup Icons\SSIN.ico
://////=__=
://////=__=
://////=__=
://////=__=
Func Welcome0()
    
    Global $nextp,$cancelapp,$welsub,$wel,$HasDone11
    
If $HasDone11 = "" Then
    
    GUICtrlSetState ( $pictop ,$GUI_hide )
    GUICtrlSetState ( $lab1 ,$GUI_hide )
    GUICtrlSetState ( $lab2 ,$GUI_hide )
    GUICtrlSetState($picside,$GUI_SHOW)
    
    $nextp = GUICtrlCreateButton("Next >", 315, 312,78, 26,$BS_DEFPUSHBUTTON)
    $cancelapp = GUICtrlCreateButton("Cancel", 398, 312,78, 26)
    $welsub = GUICtrlCreateLabel(@CR &@CR  & "This setup will guide you through the installation of "&$ProductName&"."&@CR&@CR&"It is strongly recommended that you exit all other applications before continuing with this installation."&@CR&"This will make it possible to update relevant system files without having to reboot your computer."&@CR&@CR&@CR&@CR&@CR&@CR&"Click Next to continue.", 205, 55, 260, 210)
    $font = "Comic Sans MS"
    $wel = GUICtrlCreateLabel("Welcome to the "&$ProductName&" "&$ProductVersion&" Installer", 205, 25, 280, 55)
    $font = "Arial"
    GUICtrlSetFont($wel,11, 600, 1,$font)
    
    
    GUISetState(@SW_SHOW,$gui)
    
    
    $HasDone11 = "done"
Else
    
    GUICtrlSetState ( $pictop ,$GUI_hide )
    GUICtrlSetState($lab1,$GUI_hide)
    GUICtrlSetState($lab2,$GUI_hide)
    GUICtrlSetState($picside,$GUI_show)
    GUICtrlSetState($nextp,$GUI_show)
    GUICtrlSetState($cancelapp,$GUI_show)
    GUICtrlSetState($welsub,$GUI_show)
    GUICtrlSetState($wel,$GUI_show)
    
EndIf

    
    While 1
        $msg = GUIGetMsg()
    Switch $Msg
    
    case $nextp
        ;--------------------------------------------------------------------------------------
        GUICtrlSetState($picside,$GUI_HIDE)
        GUICtrlSetState($nextp,$GUI_HIDE)
        GUICtrlSetState($cancelapp,$GUI_HIDE)
        GUICtrlSetState($welsub,$GUI_HIDE)
        GUICtrlSetState($wel,$GUI_HIDE)
        GUICtrlSetState ( $pictop ,$GUI_show )
        GUICtrlSetState($lab1,$GUI_SHOW)
        GUICtrlSetState($lab2,$GUI_SHOW)
        
        License1()
        
        ;--------------------------------------------------------------------------------------
    case $cancelapp
        $answer = MsgBox(292,"Exit Setup","Setup is not complete. If you exit now, "&$ProductName&" "&$ProductVersion&" will not be installed." &@CRLF&@CRLF& "You may run Setup again at another time to complete the installation." &@CRLF&@CRLF& "Exit Setup?" , -1,$gui)
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch

    case $GUI_EVENT_CLOSE
        $answer = MsgBox(292,"Exit Setup","Setup is not complete. If you exit now, "&$ProductName&" "&$ProductVersion&" will not be installed." &@CRLF&@CRLF& "You may run Setup again at another time to complete the installation." &@CRLF&@CRLF& "Exit Setup?" , -1,$gui)
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch
        
        
    EndSwitch
    WEnd
    GUIDelete()
    
EndFunc
Func License1()
    Global $Back12,$Next12,$Cancel12,$Input12,$Radio112,$Radio212,$HasDone12
    Local $LicenseTextFile = $SetupTempFolder & "\LicenseFile12.txt"
    FileInstall('B:\Users\Antonio\Desktop\music.txt',$SetupTempFolder & '\LicenseFile12.txt',1)
    
    
If $HasDone12 = "" Then
    
    $Back12 = GUICtrlCreateButton("< Back", 232, 312,78, 26)
    $Next12 = GUICtrlCreateButton("Next >", 315, 312,78, 26,$BS_DEFPUSHBUTTON)
    $Cancel12 = GUICtrlCreateButton("Cancel", 398, 312,78, 26)
    $LicenseText = FileRead($LicenseTextFile)
    $Input12 = GUICtrlCreateEdit($LicenseText,22,75,448,180,$WS_VSCROLL)
    GUICtrlSetBkColor($Input12, 0xfffffff)
    _GUICtrlEdit_SetReadOnly($Input12, True)
    $Radio112 = GUICtrlCreateRadio("I agree to the terms of this license agreement", 22, 255,232, 20)
    $Radio212 = GUICtrlCreateRadio("I do not agree to the terms of this license agreement", 22, 274,262, 20)
    GUICtrlSetState($Next12,$GUI_DISABLE)
    GUICtrlSetState($Radio212, $GUI_CHECKED)
    
    $HasDone12 = "done"
    
Else
    
    GUICtrlSetState ( $Next12 ,$GUI_show )
    GUICtrlSetState ( $Cancel12 ,$GUI_show )
    GUICtrlSetState ( $Radio112 ,$GUI_show )
    GUICtrlSetState ( $Radio212 ,$GUI_show )
    GUICtrlSetState ( $Back12 ,$GUI_show )
    GUICtrlSetState ( $Input12 ,$GUI_show )
    GUICtrlSetState ( $Radio112,$GUI_FOCUS)
    GUICtrlSetState ( $Next12,$GUI_FOCUS)
    
    
EndIf
GUICtrlSetData ( $lab2, "Please read the following license agreement carefully." )
    GUICtrlSetData ( $lab1, "License Agreement" )

    While 1
        $msg = GUIGetMsg()
        
    Switch $Msg
    
    case $Radio112
        GUICtrlSetState($Next12,$GUI_ENABLE)
        GUICtrlSetState ( $Next12,$GUI_FOCUS)
    
    case $Radio212
        GUICtrlSetState($Next12,$GUI_DISABLE)
    
    
    
    case $GUI_EVENT_CLOSE 
        $answer = MsgBox(292,"Exit Setup","Setup is not complete. If you exit now, "&$ProductName&" "&$ProductVersion&" will not be installed." &@CRLF&@CRLF& "You may run Setup again at another time to complete the installation." &@CRLF&@CRLF& "Exit Setup?" , -1,$gui)
            Switch $answer
                Case 6; Yes
                   Exit
                Case 7; No
            EndSwitch
    
        
        
    case $Next12
        ;-------------------------------------------------------------------------
        
        
        
        GUICtrlSetState ( $Next12 ,$GUI_hide )
        GUICtrlSetState ( $Cancel12 ,$GUI_hide )
        GUICtrlSetState ( $Radio112 ,$GUI_hide )
        GUICtrlSetState ( $Radio212 ,$GUI_hide )
        GUICtrlSetState ( $Back12 ,$GUI_hide )
        GUICtrlSetState ( $Input12 ,$GUI_hide )
        
        
        
        Destination2()
        ;-------------------------------------------------------------------------
    
    case $Cancel12
        $answer = MsgBox(292,"Exit Setup","Setup is not complete. If you exit now, "&$ProductName&" "&$ProductVersion&" will not be installed." &@CRLF&@CRLF& "You may run Setup again at another time to complete the installation." &@CRLF&@CRLF& "Exit Setup?" , -1,$gui)
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch
    
    case $Back12
        ;---------------------
        GUICtrlSetState ( $Next12 ,$GUI_hide )
        GUICtrlSetState ( $Cancel12 ,$GUI_hide )
        GUICtrlSetState ( $Radio112 ,$GUI_hide )
        GUICtrlSetState ( $Radio212 ,$GUI_hide )
        GUICtrlSetState ( $Back12 ,$GUI_hide )
        GUICtrlSetState ( $Input12 ,$GUI_hide )
        
        
    
    
    Welcome0()
        ;---------------------
        
    EndSwitch
    WEnd
    GUIDelete()
EndFunc
Func Destination2()
    Global $Back13,$Next13,$Cancel13,$ChangeDri13,$InputDri13,$HInput13,$DestDri13,$LabDri213113,$LabDri213,$Intalltxt,$HasDone13
    
    
If $HasDone13 = "" Then
    
    $Back13 = GUICtrlCreateButton("< Back", 232, 312,78, 26)
    $Next13 = GUICtrlCreateButton("Next >", 315, 312,78, 26,$BS_DEFPUSHBUTTON)
    $Cancel13 = GUICtrlCreateButton("Cancel", 398, 312,78, 26)
    $ChangeDri13 = GUICtrlCreateButton("Change...", 369, 140,80, 24)
    $InputDri13 = GUICtrlCreateEdit("", 60,140,300,24,$ES_AUTOHSCROLL)
    GUICtrlSetBkColor($InputDri13, 0xfffffff)
    $HInput13 = $InputDri13
    _GUICtrlEdit_SetText($InputDri13, $InstallFolder)
    _GUICtrlEdit_SetReadOnly($HInput13, True)
    $LabDri213 = GUICtrlCreateLabel("Setup will install files into the following folder:", 60, 120, 220, 15)
    $LabDri213113 = GUICtrlCreateLabel("At least "&$ProjectSize&" MB of free disk space is required.", 60, 270, 420, 15)
    $Intalltxt = _GUICtrlEdit_GetText($InputDri13)
    
    
    $HasDone13 = "done"
Else
    
    GUICtrlSetState ( $Next13 ,$GUI_show )
    GUICtrlSetState ( $ChangeDri13 ,$GUI_show )
    GUICtrlSetState ( $HInput13 ,$GUI_show )
    GUICtrlSetState ( $LabDri213 ,$GUI_show )
    GUICtrlSetState ( $LabDri213113 ,$GUI_show )
    GUICtrlSetState ( $Cancel13 ,$GUI_show )
    GUICtrlSetState ( $Back13 ,$GUI_show )
    GUICtrlSetState ( $Next13,$GUI_FOCUS)
    
    
endif
    GUICtrlSetData ( $lab2, "Select the folder where setup will install "&$ProductName&" "&$ProductVersion&"." )
    GUICtrlSetData ( $lab1, "Destination Folder" )
    
        

    While 1
        $msg = GUIGetMsg()
        
    Switch $Msg
        
        case $ChangeDri13
        
        $var = FileSelectFolder("Choose a folder.", "",1)
            If @error Then
            Else
        _GUICtrlEdit_SetText($HInput13, $var)
        $Intalltxt = $var
            EndIf
        
        
        
        
    
    
    case $GUI_EVENT_CLOSE
        $answer = MsgBox(32 + 4, "Exit Setup", "Setup is not complete. If you exit now, "&$ProductName&" "&$ProductVersion&" will not be installed." &@CRLF&@CRLF& "You may run Setup again at another time to complete the installation." &@CRLF&@CRLF& "Exit Setup?" , -1,$gui)
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch
        
        
        
        case $Next13
            ;-------------------------------------------------------------------------------
            GUICtrlSetState ( $Next13 ,$GUI_hide )
            GUICtrlSetState ( $ChangeDri13 ,$GUI_hide )
            GUICtrlSetState ( $HInput13 ,$GUI_hide )
            GUICtrlSetState ( $LabDri213 ,$GUI_hide )
            GUICtrlSetState ( $LabDri213113 ,$GUI_hide )
            GUICtrlSetState ( $Cancel13 ,$GUI_hide )
            GUICtrlSetState ( $Back13 ,$GUI_hide )
            
            Picture()
            ;-------------------------------------------------------------------------------
        
        
        case $Cancel13
            $answer = MsgBox(32 + 4, "Exit Setup", "Setup is not complete. If you exit now, "&$ProductName&" "&$ProductVersion&" will not be installed." &@CRLF&@CRLF& "You may run Setup again at another time to complete the installation." &@CRLF&@CRLF& "Exit Setup?" , -1,$gui)
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch
        
        
    case $Back13
        ;----------------------
            GUICtrlSetState ( $Next13 ,$GUI_hide )
            GUICtrlSetState ( $ChangeDri13 ,$GUI_hide )
            GUICtrlSetState ( $InputDri13 ,$GUI_hide )
            GUICtrlSetState ( $LabDri213 ,$GUI_hide )
            GUICtrlSetState ( $LabDri213113 ,$GUI_hide )
            GUICtrlSetState ( $Cancel13 ,$GUI_hide )
            GUICtrlSetState ( $Back13 ,$GUI_hide )
            
            License1()  
        ;----------------------
    
        
    EndSwitch   
    WEnd
    GUIDelete()
EndFunc

Func Picture()
    Global $Back16,$Next16,$Cancel16,$HasDone16,$pic1
    
    
If $HasDone16 = "" Then
    
    $Back16 = GUICtrlCreateButton("< Back", 232, 312,78, 26)
    $Next16 = GUICtrlCreateButton("Next >", 315, 312,78, 26,$BS_DEFPUSHBUTTON)
    $Cancel16 = GUICtrlCreateButton("Cancel", 398, 312,78, 26)
    $Pic1 = GUICtrlCreatePic(@DesktopDir&"\image002.jpg", 0, 64, 495, 237, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    
    GUISetState(@SW_SHOW)
    $HasDone16 = "done"
Else
    
    GUICtrlSetState ( $Next16 ,$GUI_show )
    GUICtrlSetState ( $Pic1 ,$GUI_show )
    GUICtrlSetState ( $Cancel16 ,$GUI_show )
    GUICtrlSetState ( $Back16 ,$GUI_show )
    GUICtrlSetState ( $Next16,$GUI_FOCUS)
    
    
endif
    GUICtrlSetData ( $lab2, "Custom Subtitle" )
    GUICtrlSetData ( $lab1, "Custom Title" )
    
        GUISetState(@SW_SHOW)

    While 1
        $msg = GUIGetMsg()
        
    Switch $Msg
        
    
    
    case $GUI_EVENT_CLOSE
        $answer = MsgBox(32 + 4, "Exit Setup", "Setup is not complete. If you exit now, "&$ProductName&" "&$ProductVersion&" will not be installed." &@CRLF&@CRLF& "You may run Setup again at another time to complete the installation." &@CRLF&@CRLF& "Exit Setup?" , -1,$gui)
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch
        
        
        
        case $Next16
            ;-------------------------------------------------------------------------------
            GUICtrlSetState ( $Next16 ,$GUI_hide )
            GUICtrlSetState ( $Pic1 ,$GUI_hide )
            GUICtrlSetState ( $Cancel16 ,$GUI_hide )
            GUICtrlSetState ( $Back16 ,$GUI_hide )
            
            Shortcuts3()
            ;-------------------------------------------------------------------------------
        
        
        case $Cancel16
            $answer = MsgBox(32 + 4, "Exit Setup", "Setup is not complete. If you exit now, "&$ProductName&" "&$ProductVersion&" will not be installed." &@CRLF&@CRLF& "You may run Setup again at another time to complete the installation." &@CRLF&@CRLF& "Exit Setup?" , -1,$gui)
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch
        
        
    case $Back16
        ;----------------------
            GUICtrlSetState ( $Next16 ,$GUI_hide )
            GUICtrlSetState ( $Pic1 ,$GUI_hide )
            GUICtrlSetState ( $Cancel16 ,$GUI_hide )
            GUICtrlSetState ( $Back16 ,$GUI_hide )
            
            Destination2()  
        ;----------------------
    
        
    EndSwitch   
    WEnd
    GUIDelete()
EndFunc

Func Shortcuts3()
    Global $ShortAllUsr14,$ShortStartM14,$ShortDesktop14,$SLab214,$SLab114,$ShortDri14,$SInputR14,$SInput114,$Cancel14,$Next14,$Back14,$HasDone14
    
If $HasDone14 = "" Then
    
    $Back14 = GUICtrlCreateButton("< Back", 232, 312,78, 26)
    $Next14 = GUICtrlCreateButton("Next >", 315, 312,78, 26,$BS_DEFPUSHBUTTON)
    $Cancel14 = GUICtrlCreateButton("Cancel", 398, 312,78, 26)
    $SInput114 = GUICtrlCreateEdit("", 60,140,372,24,$ES_AUTOHSCROLL)
    $SInputR14 = $SInput114
    _GUICtrlEdit_SetText($SInput114,$ShortcutFolder)
    $SLab114 = GUICtrlCreateLabel("Setup will create shortcut in the Start Menu Programs folder.", 60, 120, 340, 15)
    $SLab214 = GUICtrlCreateLabel("Create Shortcuts:", 60, 190, 340, 15)
    $ShortDesktop14 = GUICtrlCreateCheckbox("On the Desktop",60,215,300,15)
    $ShortStartM14 = GUICtrlCreateCheckbox("In the Start Menu Programs folder",60,235,300,15)
    $ShortAllUsr14 = GUICtrlCreateCheckbox("For all the users on this computer",60,255,300,15)
    
    GUICtrlSetState ( $ShortAllUsr14, $GUI_CHECKED )
    GUICtrlSetState ( $ShortStartM14, $GUI_CHECKED )
    GUICtrlSetState ( $ShortDesktop14, $GUI_CHECKED )
    ;main
    $shdesk = FileReadLine(@TempDir & "\short on desktop.config",1)
    $shstartm = FileReadLine(@TempDir & "\short start menu.config",1)
    $shallusr = FileReadLine(@TempDir & "\short all user.config",1)
    ;-------------------------------------------
    If $shdesk = 4 Then
            GUICtrlSetState ( $ShortDesktop14, $GUI_UNCHECKED )
        Else
            GUICtrlSetState ( $ShortDesktop14, $GUI_CHECKED )
    EndIf
    
    ;-------------------------------------------------
    If $shstartm = 4 Then
            GUICtrlSetState ( $ShortStartM14, $GUI_UNCHECKED )
        Else
            GUICtrlSetState ( $ShortStartM14, $GUI_CHECKED )
    EndIf
        ;----------------------------------------
    If $shallusr = 4 Then
            GUICtrlSetState ( $ShortAllUsr14, $GUI_UNCHECKED )
        Else
            GUICtrlSetState ( $ShortAllUsr14, $GUI_CHECKED )
    EndIf
    
    
    $HasDone14 = "done"
Else
    
    GUICtrlSetState ( $Next14 ,$GUI_show )
    GUICtrlSetState ( $Back14 ,$GUI_show )
    GUICtrlSetState ( $ShortDesktop14 ,$GUI_show )
    GUICtrlSetState ( $ShortStartM14 ,$GUI_show )
    GUICtrlSetState ( $ShortAllUsr14 ,$GUI_show )
    GUICtrlSetState ( $Cancel14 ,$GUI_show )
    GUICtrlSetState ( $SLab114 ,$GUI_show )
    GUICtrlSetState ( $SLab214 ,$GUI_show )
    GUICtrlSetState ( $SInput114 ,$GUI_show )
    GUICtrlSetState ( $Next14,$GUI_FOCUS)
    
EndIf
    GUICtrlSetData ( $lab2, "Select the location where you would like to create shortcuts." )
    GUICtrlSetData ( $lab1, "Set up Shortcuts" )
    
    

    While 1
        $msg = GUIGetMsg()
        
    Switch $Msg
    
    
    case $GUI_EVENT_CLOSE
        $answer = MsgBox(32 + 4, "Exit Setup", "Setup is not complete. If you exit now, "&$ProductName&" "&$ProductVersion&" will not be installed." &@CRLF&@CRLF& "You may run Setup again at another time to complete the installation." &@CRLF&@CRLF& "Exit Setup?" , -1,$gui)
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch
        
        
        case $Next14
            ;---------------------------------------------------------------------------------------
            
            GUICtrlSetState ( $Next14 ,$GUI_hide )
            GUICtrlSetState ( $Back14 ,$GUI_hide )
            GUICtrlSetState ( $ShortDesktop14 ,$GUI_hide )
            GUICtrlSetState ( $ShortStartM14 ,$GUI_hide )
            GUICtrlSetState ( $ShortAllUsr14 ,$GUI_hide )
            GUICtrlSetState ( $Cancel14 ,$GUI_hide )
            GUICtrlSetState ( $SLab114 ,$GUI_hide )
            GUICtrlSetState ( $SLab214 ,$GUI_hide )
            GUICtrlSetState ( $SInput114 ,$GUI_hide )
            
            Ready4()
            ;---------------------------------------------------------------------------------------
        
        
        case $Cancel14
            $answer = MsgBox(32 + 4, "Exit Setup", "Setup is not complete. If you exit now, "&$ProductName&" "&$ProductVersion&" will not be installed." &@CRLF&@CRLF& "You may run Setup again at another time to complete the installation." &@CRLF&@CRLF& "Exit Setup?" , -1,$gui)
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch
    
    
    
    case $Back14

            ;-----------------------------------------------------------------
        
            GUICtrlSetState ( $Next14 ,$GUI_hide )
            GUICtrlSetState ( $Back14 ,$GUI_hide )
            GUICtrlSetState ( $ShortDesktop14 ,$GUI_hide )
            GUICtrlSetState ( $ShortStartM14 ,$GUI_hide )
            GUICtrlSetState ( $ShortAllUsr14 ,$GUI_hide )
            GUICtrlSetState ( $Cancel14 ,$GUI_hide )
            GUICtrlSetState ( $SLab114 ,$GUI_hide )
            GUICtrlSetState ( $SLab214 ,$GUI_hide )
            GUICtrlSetState ( $SInput114 ,$GUI_hide )
            
            Picture()
        ;-----------------------------
        
        
    EndSwitch
    WEnd
    GUIDelete()
EndFunc
Func Ready4()
    
    Global $Back15,$Next15,$Cancel15,$RedyLab215,$RedyLa115,$RedyInput15,$HasDone15
    
If $HasDone15 = "" Then
    
    $Back15 = GUICtrlCreateButton("< Back", 232, 312,78, 26)
    $Next15 = GUICtrlCreateButton("Install", 315, 312,78, 26,$BS_DEFPUSHBUTTON)
    $Cancel15 = GUICtrlCreateButton("Cancel", 398, 312,78, 26)
    
    $RedyLab215 = GUICtrlCreateLabel("Setup will be installing in the folloing location:", 60, 120, 340, 15)
    $RedyLa115 = GUICtrlCreateLabel("Click Install to continue.", 60, 240, 340, 15)
    $RedyInput15 = GUICtrlCreateEdit("", 60,140,372,24,$ES_AUTOHSCROLL)
    _GUICtrlEdit_SetText($RedyInput15, $Intalltxt)
    GUICtrlSetBkColor($RedyInput15, 0xfffffff)
    
    $HasDone15 = "done"
Else
    
    GUICtrlSetState ( $Next15 ,$GUI_show )
    GUICtrlSetState ( $Back15 ,$GUI_show )
    GUICtrlSetState ( $Cancel15 ,$GUI_show )
    GUICtrlSetState ( $RedyLab215 ,$GUI_show )
    GUICtrlSetState ( $RedyLa115 ,$GUI_show )
    GUICtrlSetState ( $RedyInput15 ,$GUI_show )
    GUICtrlSetState ( $Next15,$GUI_FOCUS)
    _GUICtrlEdit_SetText($RedyInput15, $Intalltxt)
    
EndIf
    
GUICtrlSetData ( $lab1, "Summary" )
    GUICtrlSetData ( $lab2, "The Setup is ready to begin installation." )
    While 1
        $msg = GUIGetMsg()
    
    Switch $Msg
    
    case $GUI_EVENT_CLOSE
        $answer = MsgBox(32 + 4, "Exit Setup", "Setup is not complete. If you exit now, "&$ProductName&" "&$ProductVersion&" will not be installed." &@CRLF&@CRLF& "You may run Setup again at another time to complete the installation." &@CRLF&@CRLF& "Exit Setup?" , -1,$gui)
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch
        
        
        
        case $Next15
            ;------------------------------------------------------------------------
            GUICtrlSetState ( $Next15 ,$GUI_hide )
            GUICtrlSetState ( $Back15 ,$GUI_hide )
            GUICtrlSetState ( $Cancel15 ,$GUI_hide )
            GUICtrlSetState ( $RedyLab215 ,$GUI_hide )
            GUICtrlSetState ( $RedyLa115 ,$GUI_hide )
            GUICtrlSetState ( $RedyInput15 ,$GUI_hide )
            
            Installing5()
            ;------------------------------------------------------------------------
        
        
        case $Cancel15
            $answer = MsgBox(32 + 4, "Exit Setup", "Setup is not complete. If you exit now, "&$ProductName&" "&$ProductVersion&" will not be installed." &@CRLF&@CRLF& "You may run Setup again at another time to complete the installation." &@CRLF&@CRLF& "Exit Setup?" , -1,$gui)
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch
    
    
    case $Back15
        ;--------------------------
            GUICtrlSetState ( $Next15 ,$GUI_hide )
            GUICtrlSetState ( $Back15 ,$GUI_hide )
            GUICtrlSetState ( $Cancel15 ,$GUI_hide )
            GUICtrlSetState ( $RedyLab215 ,$GUI_hide )
            GUICtrlSetState ( $RedyLa115 ,$GUI_hide )
            GUICtrlSetState ( $RedyInput15 ,$GUI_hide )
            
            Shortcuts3()
        ;--------------------------
        
        
    EndSwitch
    WEnd
    GUIDelete()
EndFunc
Func Installing5()
    
    Global $installprogress
    

    GUICtrlSetData ( $lab1, "Installing" )
    GUICtrlSetData ( $lab2, "The program features you selected are being configured." )
    $cancelapp5 = GUICtrlCreateButton("Cancel", 398, 312,78, 26)
    $installab = GUICtrlCreateLabel("Please wait while the setup installs "&$ProductName&". This may take several minutes.", 60, 100, 400, 40)
    $installab1 = GUICtrlCreateLabel("Status:", 60, 150, 340, 15)
    $installprogress = GUICtrlCreateProgress(60,180,371,17,$PBS_SMOOTH)
    GUISetState(@SW_SHOW)
    prein()
        

        
    Sleep(500)
    aftin()
    ;--------------------------------------------------------------------------------------------------------
    GUICtrlSetState ( $cancelapp5 ,$GUI_hide )
    GUICtrlSetState ( $installab ,$GUI_hide )
    GUICtrlSetState ( $installab1 ,$GUI_hide )
    GUICtrlSetState ( $installprogress ,$GUI_hide )
    
    Finish6()
    ;---------------------------------------------------------------------------------------------------------
    


    While 1
        $msg = GUIGetMsg()
        
    Switch $Msg
    
    
    
    case $GUI_EVENT_CLOSE
        $answer = MsgBox(32 + 4, "Exit Setup", "Setup is not complete. If you exit now, "&$ProductName&" "&$ProductVersion&" will not be installed." &@CRLF&@CRLF& "You may run Setup again at another time to complete the installation." &@CRLF&@CRLF& "Exit Setup?" , -1,$gui)
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch
        
        
    case $cancelapp5
        $answer = MsgBox(32 + 4, "Exit Setup", "Setup is not complete. If you exit now, "&$ProductName&" "&$ProductVersion&" will not be installed." &@CRLF&@CRLF& "You may run Setup again at another time to complete the installation." &@CRLF&@CRLF& "Exit Setup?" , -1,$gui)
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch
                
                
        
    EndSwitch
    WEnd
    GUIDelete()
EndFunc
Func Finish6()
    
    GUICtrlSetState ( $pictop ,$GUI_hide )
    GUICtrlSetState ( $lab1 ,$GUI_hide )
    GUICtrlSetState ( $lab2 ,$GUI_hide )
    GUICtrlSetState ( $picside ,$GUI_show )
    GUICtrlCreateGraphic( 66, 33, 33, 33)
    $finishapp = GUICtrlCreateButton("Finish", 315, 312,78, 26,$BS_DEFPUSHBUTTON)
    GUICtrlCreateLabel($ProductName&" has been successfully installed on your computer.", 205, 75, 260, 45)
    
    $Runapp = GUICtrlCreateCheckbox("Launch "&$ProductName&" "&$ProductVersion,205,155,270,25)
    GUICtrlCreateLabel("Click Finish to quit the Installer.",205, 220, 340, 25)
    $font = "Arial"
    $congrets = GUICtrlCreateLabel($ProductName&" "&$ProductVersion&" Installer Completed", 205, 25, 270, 50)
    GUICtrlSetFont($congrets,11, 600, 1,$font)
    
    
    
    
    
    GUICtrlSetState ( $Runapp, $GUI_CHECKED )
    

    
    While 1
        $msg = GUIGetMsg()
        
    Switch $Msg
    
case $finishapp
    infinish()
        Exit
    
        
        

    case $GUI_EVENT_CLOSE
        $answer = MsgBox(32 + 4, "Exit Setup", "Setup is not complete. If you exit now, "&$ProductName&" "&$ProductVersion&" will not be installed." &@CRLF&@CRLF& "You may run Setup again at another time to complete the installation." &@CRLF&@CRLF& "Exit Setup?" , -1,$gui)
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch
        
        
        

    EndSwitch
    WEnd
    GUIDelete()
    
EndFunc
Func Requirements()


EndFunc
Func instart()

EndFunc
Func infinish()

EndFunc
Func prein()

EndFunc
Func aftin()

EndFunc

Have a look at the Setup Preview, download link below.

Download

Share this post


Link to post
Share on other sites

Where is the flickering in your example ?!

Is it only in a compiled version ?

Best regards,

Emiel


Best regards,Emiel Wieldraaijer

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Where is the flickering in your example ?!

Is it only in a compiled version ?

Best regards,

Emiel

The flickering happens when I update the label on the 2nd screen which is the licence screen and the Installing screen. I fixed a little bit of the flickering by adding $WS_EX_COMPOSITED to the GUI.

Flickering on both types of runs which is the compiled version and the normal script run.

Edited by Antop

Share this post


Link to post
Share on other sites

$WS_EX_COMPOSITED will not work with AERO/WDM being enabled (Vista and Win7). If your updating the lables in a tight loop, add a timercheck to delay the updates.

Share this post


Link to post
Share on other sites

$WS_EX_COMPOSITED will not work with AERO/WDM being enabled (Vista and Win7). If your updating the lables in a tight loop, add a timercheck to delay the updates.

Thanks

I will do that.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

I tried delaying the label updates but it looked doggy so I changed the whole look of the setup. Please replay on what you think about the NEW LOOK of the Setup.

Download link below.

Download Setup

Images

Posted Image

Posted Image

Edited by Antop

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