Jump to content
Skeletor

MS Office Style Splash Screen

Recommended Posts

Skeletor

MS Splash Screens

The office 2016/17 office suite has made many people turn heads with its functions and especially their splash screen.

I now present to you, the MS Style Splash Screen. For Rookies, Novices and anyone who wants a ready made splash screen for your gui application.

You can now download it and also try it out yourself.
You have three colors to choose from:
Blue
Red
Green

All three colours are from the famous programs.
I also included the KODA form to you can have freedom with this splash screen.
Note: the KODA form does not have the three colours as well as the correct blue. 

Have fun and enjoy.

Note:
Thanks to kaz for updating the side scrolling dots.

 

 

Edited by Skeletor
  • Like 1

Kind Regards
Skeletor

"I need coffee to turn me back to a human"

Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Wondering who uses AutoIt and what it can be used for ?

 

Share this post


Link to post
Share on other sites
coffeeturtle

Nice work!

Looking forward to:

Note:
I will update the splash to add the automated 3 dots animation at a later stage. 

Thank you for sharing!

Share this post


Link to post
Share on other sites
coffeeturtle
On 10/16/2017 at 4:41 AM, Skeletor said:

Note:

 

I will update the splash to add the automated 3 dots animation at a later stage. 

 

@Skeletor Just wondering if the three dot animation was still something you were looking at?  Thanks!

 

Share this post


Link to post
Share on other sites
coffeeturtle

No worries @Skeletor  Thank you much!  I was just checking in. Pretty nice even without animation. Looking forward to your update in the future!

Share this post


Link to post
Share on other sites
kaz

I tried to do a small animation. i took the code of this topic and some code from GDI+ animated loading screens build 2014-06-20 from UEZ

GDI+ animated loading screens

It's not perfect ...

#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <Memory.au3>
#include <GDIPlus.au3>
#include <WindowsConstants.au3>

#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <TrayConstants.au3>


Global Const $hDwmApiDll = DllOpen("dwmapi.dll")
Global $sChkAero = DllStructCreate("int;")
DllCall($hDwmApiDll, "int", "DwmIsCompositionEnabled", "ptr", DllStructGetPtr($sChkAero))
Global $bAero = DllStructGetData($sChkAero, 1)
Global $fStep = 0.02
If Not $bAero Then $fStep = 1.25

_GDIPlus_Startup()

Global $iW = 300, $iH = 120

$hGUI = GUICreate("Office", 442, 252, @DesktopWidth /2.95, @DesktopHeight /3.2, $WS_POPUP)
GUISetBkColor(0xB7472A)
;GUISetBkColor(0x2b579a) ;Word Blue
GUISetBkColor(0x217346) ;Excel Green
$Label1 = GUICtrlCreateLabel("SciTE4AutoIt3", 8, 8, 102, 21)
GUICtrlSetFont(-1, 10, 400, 0, "Segoe UI Light")
GUICtrlSetColor(-1, 0xFFFFFF)
$Label2 = GUICtrlCreateLabel("AutoIt 247", 64, 72, 314, 75, BitOR($SS_CENTER,$SS_CENTERIMAGE))
GUICtrlSetFont(-1, 40, 400, 0, "Segoe UI Light")
GUICtrlSetColor(-1, 0xFFFFFF)
$Label3 = GUICtrlCreateLabel("Starting...", 10, 205, 54, 21)
GUICtrlSetFont(-1, 10, 400, 0, "Segoe UI Light")
GUICtrlSetColor(-1, 0xFFFFFF)
$Label4 = GUICtrlCreateLabel("r", 410, 4, 20, 21)
GUICtrlSetFont(-1, 12, 400, 0, "Webdings")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetTip(-1, "Closes the splash screen.")
$Label5 = GUICtrlCreateLabel("0", 385, 0, 20, 21)
GUICtrlSetFont(-1, 12, 400, 0, "Webdings")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetTip(-1, "Minimises the splash screen.")
GUISetState(@SW_SHOW)

Global Const $iPic = GUICtrlCreatePic("", 80, 150, $iW, $iH)
GUICtrlSetState(-1, $GUI_DISABLE)
WinSetTrans($hGUI, "", 0)
GUISetState()
Global $hHBmp_BG, $hB, $iSleep = 50
GUIRegisterMsg($WM_TIMER, "PlayAnim")
DllCall("user32.dll", "int", "SetTimer", "hwnd", $hGUI, "int", 0, "int", $iSleep, "int", 0)

Global $z, $iPerc
For $z = 1 To 255 Step $fStep
    WinSetTrans($hGUI, "", $z)
Next

Do
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            GUIRegisterMsg($WM_TIMER, "")
            _WinAPI_DeleteObject($hHBmp_BG)
            _GDIPlus_Shutdown()
            GUIDelete()
            Exit
    EndSwitch
Until False

Func PlayAnim()
    $hHBmp_BG = _GDIPlus_ThreeBalls($iW, $iH, $iPerc)
    $hB = GUICtrlSendMsg($iPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBmp_BG)
    If $hB Then _WinAPI_DeleteObject($hB)
    _WinAPI_DeleteObject($hHBmp_BG)
;   Joue sur la vitesse d affichage
    $iPerc += 0.5
    If $iPerc > 110 Then $iPerc = 0
EndFunc   ;==>PlayAnim

Func _GDIPlus_ThreeBalls($iW, $iH, $iPerc, $sString = "Please wait...", $iRadius = 12, $iBalls = 3, $bHBitmap = True)
    Local Const $iDiameter = $iRadius * 2

    Local $tPointF1 = DllStructCreate("float;float")
    Local $pPointF1 = DllStructGetPtr($tPointF1)
    Local $tPointF2 = DllStructCreate("float;float")
    Local $pPointF2 = DllStructGetPtr($tPointF2)
    DllStructSetData($tPointF1, 1, $iDiameter)
    DllStructSetData($tPointF1, 2, 0)
    DllStructSetData($tPointF2, 1, $iDiameter)
    DllStructSetData($tPointF2, 2, $iDiameter)

    Local $hBrushBall2 = DllCall($__g_hGDIPDll, "uint", "GdipCreateLineBrush", "ptr", $pPointF1, "ptr", $pPointF2, "uint", 0xFFcecbca, "uint", 0xFFf2eeed, "int", 1, "int*", 0)
    $hBrushBall2 = $hBrushBall2[6]

    Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH)

    Local Const $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    _GDIPlus_GraphicsSetSmoothingMode($hCtxt, 2)
    _GDIPlus_GraphicsSetPixelOffsetMode($hCtxt, $GDIP_PIXELOFFSETMODE_HIGHQUALITY)

    Local Const $hBrushBall1 = _GDIPlus_BrushCreateSolid(0xFF217346)


    _GDIPlus_GraphicsFillRect($hCtxt, 0, 0, $iW, $iH, $hBrushBall1)

    Local $aPos[$iBalls + 2][4], $iArrayPos, $j = 1
    Local Static $aCircle[$iBalls + 1]
    For $i = 0 To $iBalls - 1
        $aPos[($iBalls - 1) - $i][0] = ($iW / 2) - (($iDiameter + $iRadius) * ($i + 1)) + (($iBalls - 1) / 2 * ($iDiameter + $iRadius)) + $iDiameter
        $aPos[($iBalls - 1) - $i][1] = ($iH - $iRadius) / 2
        _GDIPlus_GraphicsFillEllipse($hCtxt, $aPos[($iBalls - 1) - $i][0], $aPos[($iBalls - 1) - $i][1], $iDiameter, $iDiameter, $hBrushBall1) ;draw background
        $aPos[($iBalls - 1) - $i][2] = 100 / $iBalls
        $iArrayPos = Int($iPerc / ($aPos[($iBalls - 1) - $i][2]))
        $aPos[$iArrayPos][3] = ($iPerc - ($iArrayPos * ($aPos[($iBalls - 1) - $i][2]))) / $aPos[($iBalls - 1) - $i][2]
        If $iArrayPos > 0 Then
            For $j = 0 To $iArrayPos - 1
                $aPos[$j][3] = 1
            Next
        EndIf
    Next


; Animation remplissage des balles
    Local $fMax = 2, $hPen = _GDIPlus_PenCreate(0x217346, 1)


    Local $i, $fDH
    Local Static $s, $t


    For $i = 0 To $iBalls - 1
        _GDIPlus_PenSetColor($hPen, 0xFF217346)
        $iHeight = $iRadius * 0.05
        $fDH = Sin($s + Cos($i + $t)) * $iHeight * 0.66666
        $s += 0.05
        _GDIPlus_GraphicsFillEllipse($hCtxt, $iRadius + $aPos[$i][0] - $iRadius * $fDH, $iRadius + $aPos[$i][1] - $iRadius * $fDH, $iDiameter * $fDH, $iDiameter * $fDH, $hBrushBall2)
    Next


    _GDIPlus_GraphicsDispose($hCtxt)
    _GDIPlus_BrushDispose($hBrushBall1)
    _GDIPlus_BrushDispose($hBrushBall2)
    _GDIPlus_PenDispose($hPen)

    If $bHBitmap Then
        Local $hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
        _GDIPlus_BitmapDispose($hBitmap)
        Return $hHBITMAP
    EndIf
    Return $hBitmap
EndFunc

A lots of code only for three dots

  • Like 2

Share this post


Link to post
Share on other sites
Bilgus

Thats really not that much code

Nice Job,

It'd be nice to have the X button work and a fade out

Do
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE, $Label4
            ConsoleWrite("Exit")
            GUIRegisterMsg($WM_TIMER, "")
            _WinAPI_DeleteObject($hHBmp_BG)
            _GDIPlus_Shutdown()
            For $z = 255 To 1 Step -$fStep
                WinSetTrans($hGUI, "", $z)
            Next
            GUIDelete($hGUI)
            Exit
    EndSwitch
Until False

 

  • Like 1

Share this post


Link to post
Share on other sites
kaz

Thanks UEZ again for his work.

I think this part of code should be improved 

For $i = 0 To $iBalls - 1
        _GDIPlus_PenSetColor($hPen, 0xFF217346)
        $iHeight = $iRadius * 0.05
        $fDH = Sin($s + Cos($i + $t)) * $iHeight * 0.66666
        $s += 0.05
        _GDIPlus_GraphicsFillEllipse($hCtxt, $iRadius + $aPos[$i][0] - $iRadius * $fDH, $iRadius + $aPos[$i][1] - $iRadius * $fDH, $iDiameter * $fDH, $iDiameter * $fDH, $hBrushBall2)
    Next

 

  • Like 1

Share this post


Link to post
Share on other sites
kaz

A little bit cleaner, with color  choice in one place : 

#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <Memory.au3>
#include <GDIPlus.au3>
#include <WindowsConstants.au3>

#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <TrayConstants.au3>


Global Const $sExcelColor = "217346", $sWordColor = "2b579a", $sOutlookColor = "B7472A"

Global Const $sThemeColor = $sOutlookColor

Global Const $hDwmApiDll = DllOpen("dwmapi.dll")
Global $sChkAero = DllStructCreate("int;")
DllCall($hDwmApiDll, "int", "DwmIsCompositionEnabled", "ptr", DllStructGetPtr($sChkAero))
Global $bAero = DllStructGetData($sChkAero, 1)
Global $fStep = 0.02
If Not $bAero Then $fStep = 1.25

_GDIPlus_Startup()

Global $iW = 300, $iH = 120

$hGUI = GUICreate("Office", 442, 252, @DesktopWidth /2.95, @DesktopHeight /3.2, $WS_POPUP)

GUISetBkColor("0x" & $sThemeColor)


;~ GUISetBkColor(0xB7472A)
;GUISetBkColor(0x2b579a) ;Word Blue
;~ GUISetBkColor(0x217346) ;Excel Green
$Label1 = GUICtrlCreateLabel("SciTE4AutoIt3", 8, 8, 102, 21)
GUICtrlSetFont(-1, 10, 400, 0, "Segoe UI Light")
GUICtrlSetColor(-1, 0xFFFFFF)
$Label2 = GUICtrlCreateLabel("AutoIt 247", 64, 72, 314, 75, BitOR($SS_CENTER,$SS_CENTERIMAGE))
GUICtrlSetFont(-1, 40, 400, 0, "Segoe UI Light")
GUICtrlSetColor(-1, 0xFFFFFF)
$Label3 = GUICtrlCreateLabel("Starting...", 10, 205, 54, 21)
GUICtrlSetFont(-1, 10, 400, 0, "Segoe UI Light")
GUICtrlSetColor(-1, 0xFFFFFF)
$Label4 = GUICtrlCreateLabel("r", 410, 4, 20, 21)
GUICtrlSetFont(-1, 12, 400, 0, "Webdings")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetTip(-1, "Closes the splash screen.")
$Label5 = GUICtrlCreateLabel("0", 385, 0, 20, 21)
GUICtrlSetFont(-1, 12, 400, 0, "Webdings")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetTip(-1, "Minimises the splash screen.")
GUISetState(@SW_SHOW)

Global Const $iPic = GUICtrlCreatePic("", 80, 150, $iW, $iH)
GUICtrlSetState(-1, $GUI_DISABLE)
WinSetTrans($hGUI, "", 0)
GUISetState()
Global $hHBmp_BG, $hB, $iSleep = 100
GUIRegisterMsg($WM_TIMER, "PlayAnim")
DllCall("user32.dll", "int", "SetTimer", "hwnd", $hGUI, "int", 0, "int", $iSleep, "int", 0)

Global $z, $iPerc
For $z = 1 To 255 Step $fStep
    WinSetTrans($hGUI, "", $z)
Next

Do
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE, $Label4
            ConsoleWrite("Exit")
            GUIRegisterMsg($WM_TIMER, "")
            _WinAPI_DeleteObject($hHBmp_BG)
            _GDIPlus_Shutdown()
            For $z = 255 To 1 Step -$fStep
                WinSetTrans($hGUI, "", $z)
            Next
            GUIDelete($hGUI)
            Exit
    EndSwitch
Until False

Func PlayAnim()
    $hHBmp_BG = _GDIPlus_ThreeBalls($iW, $iH, $iPerc)
    $hB = GUICtrlSendMsg($iPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBmp_BG)
    If $hB Then _WinAPI_DeleteObject($hB)
    _WinAPI_DeleteObject($hHBmp_BG)
;   Joue sur la vitesse d affichage
    $iPerc += 1
    If $iPerc > 110 Then $iPerc = 0
EndFunc   ;==>PlayAnim

Func _GDIPlus_ThreeBalls($iW, $iH, $iPerc, $sString = "Please wait...", $iRadius = 5, $iBalls = 3, $bHBitmap = True)
    Local Const $iDiameter = $iRadius * 2

    Local $tPointF1 = DllStructCreate("float;float")
    Local $pPointF1 = DllStructGetPtr($tPointF1)
    Local $tPointF2 = DllStructCreate("float;float")
    Local $pPointF2 = DllStructGetPtr($tPointF2)
    DllStructSetData($tPointF1, 1, $iDiameter)
    DllStructSetData($tPointF1, 2, 0)
    DllStructSetData($tPointF2, 1, $iDiameter)
    DllStructSetData($tPointF2, 2, $iDiameter)

    Local $hBrushBall2 = DllCall($__g_hGDIPDll, "uint", "GdipCreateLineBrush", "ptr", $pPointF1, "ptr", $pPointF2, "uint", 0xFFcecbca, "uint", 0xFFf2eeed, "int", 1, "int*", 0)
    $hBrushBall2 = $hBrushBall2[6]

    Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH)

    Local Const $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    _GDIPlus_GraphicsSetSmoothingMode($hCtxt, 2)
    _GDIPlus_GraphicsSetPixelOffsetMode($hCtxt, $GDIP_PIXELOFFSETMODE_HIGHQUALITY)

    Local Const $hBrushBall1 = _GDIPlus_BrushCreateSolid("0xFF" & $sThemeColor)

    _GDIPlus_GraphicsFillRect($hCtxt, 0, 0, $iW, $iH, $hBrushBall1)

    Local $aPos[$iBalls + 2][4], $iArrayPos, $j = 1
    Local Static $aCircle[$iBalls + 1]
    For $i = 0 To $iBalls - 1
        $aPos[($iBalls - 1) - $i][0] = ($iW / 2) - (($iDiameter  * 3) * ($i + 1)) + (($iBalls - 1) / 2 * ($iDiameter  * 3)) + $iDiameter * 3
        $aPos[($iBalls - 1) - $i][1] = ($iH - $iRadius) / 2
        _GDIPlus_GraphicsFillCircle($hCtxt, $aPos[($iBalls - 1) - $i][0], $aPos[($iBalls - 1) - $i][1], $iRadius, $hBrushBall1)
        $aPos[($iBalls - 1) - $i][2] = 100 / $iBalls
        $iArrayPos = Int($iPerc / ($aPos[($iBalls - 1) - $i][2]))
        $aPos[$iArrayPos][3] = ($iPerc - ($iArrayPos * ($aPos[($iBalls - 1) - $i][2]))) / $aPos[($iBalls - 1) - $i][2]
        If $iArrayPos > 0 Then
            For $j = 0 To $iArrayPos - 1
                $aPos[$j][3] = 1
            Next
        EndIf
    Next


; Animation remplissage des balles
    Local $i, $fDH
    Local Static $s


    For $i = 0 To $iBalls - 1
        $fDH = Sin($s + Cos($i ))
        $s += 0.1
        _GDIPlus_GraphicsFillCircle($hCtxt, $aPos[$i][0], $aPos[$i][1], $iRadius * abs($fDH) , $hBrushBall2)
    Next

    _GDIPlus_GraphicsDispose($hCtxt)
    _GDIPlus_BrushDispose($hBrushBall1)
    _GDIPlus_BrushDispose($hBrushBall2)
;~  _GDIPlus_PenDispose($hPen)

    If $bHBitmap Then
        Local $hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
        _GDIPlus_BitmapDispose($hBitmap)
        Return $hHBITMAP
    EndIf
    Return $hBitmap
EndFunc



func _GDIPlus_GraphicsFillCircle($hCtxt, $iXCenterPos, $iCenterYPos, $iRadius, $hBrush)
    _GDIPlus_GraphicsFillEllipse($hCtxt, $iXCenterPos - $iRadius, $iCenterYPos - $iRadius,  $iRadius * 2, $iRadius * 2, $hBrush)
endFunc

 

  • Like 2

Share this post


Link to post
Share on other sites
kaz

You can replace the line

_GDIPlus_GraphicsFillCircle($hCtxt, $aPos[$i][0], $aPos[$i][1], $iRadius * abs($fDH) , $hBrushBall2)

by 

$height = 20
_GDIPlus_GraphicsFillCircle($hCtxt, $aPos[$i][0], $aPos[$i][1]  + $height * abs($fDH), $iRadius  , $hBrushBall2)

to simply obtain an other animation.

  • Like 1

Share this post


Link to post
Share on other sites
kaz

More cleaning, better animation...perhaps

Global Const $sExcelColor = "217346", $sWordColor = "2b579a", $sOutlookColor = "B7472A"
Global Const $sThemeColor = $sWordColor

Local Const $PI = 3.141592653589793


Global Const $hDwmApiDll = DllOpen("dwmapi.dll")
Global $sChkAero = DllStructCreate("int;")
DllCall($hDwmApiDll, "int", "DwmIsCompositionEnabled", "ptr", DllStructGetPtr($sChkAero))
Global $bAero = DllStructGetData($sChkAero, 1)
Global $fStep = 0.02
If Not $bAero Then $fStep = 1.25

_GDIPlus_Startup()

Global $iW = 300, $iH = 120

$hGUI = GUICreate("Office", 442, 252, @DesktopWidth / 2.95, @DesktopHeight / 3.2, $WS_POPUP)

GUISetBkColor("0x" & $sThemeColor)


;GUISetBkColor(0xB7472A)
;GUISetBkColor(0x2b579a) ;Word Blue
;GUISetBkColor(0x217346) ;Excel Green
$Label1 = GUICtrlCreateLabel("SciTE4AutoIt3", 8, 8, 102, 21)
GUICtrlSetFont(-1, 10, 400, 0, "Segoe UI Light")
GUICtrlSetColor(-1, 0xFFFFFF)
$Label2 = GUICtrlCreateLabel("AutoIt 247", 64, 72, 314, 75, BitOR($SS_CENTER, $SS_CENTERIMAGE))
GUICtrlSetFont(-1, 40, 400, 0, "Segoe UI Light")
GUICtrlSetColor(-1, 0xFFFFFF)
$Label3 = GUICtrlCreateLabel("Starting...", 10, 205, 54, 21)
GUICtrlSetFont(-1, 10, 400, 0, "Segoe UI Light")
GUICtrlSetColor(-1, 0xFFFFFF)
$Label4 = GUICtrlCreateLabel("r", 410, 4, 20, 21)
GUICtrlSetFont(-1, 12, 400, 0, "Webdings")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetTip(-1, "Closes the splash screen.")
$Label5 = GUICtrlCreateLabel("0", 385, 0, 20, 21)
GUICtrlSetFont(-1, 12, 400, 0, "Webdings")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetTip(-1, "Minimises the splash screen.")
GUISetState(@SW_SHOW)

Global Const $iPic = GUICtrlCreatePic("", 80, 150, $iW, $iH)
GUICtrlSetState(-1, $GUI_DISABLE)
WinSetTrans($hGUI, "", 0)
GUISetState()
Global $hHBmp_BG, $hB, $iSleep = 100
GUIRegisterMsg($WM_TIMER, "PlayAnim")
DllCall("user32.dll", "int", "SetTimer", "hwnd", $hGUI, "int", 0, "int", $iSleep, "int", 0)

Global $z, $iPerc
For $z = 1 To 255 Step $fStep
    WinSetTrans($hGUI, "", $z)
Next

Do
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE, $Label4
            ConsoleWrite("Exit")
            GUIRegisterMsg($WM_TIMER, "")
            _WinAPI_DeleteObject($hHBmp_BG)
            _GDIPlus_Shutdown()
            For $z = 255 To 1 Step -$fStep
                WinSetTrans($hGUI, "", $z)
            Next
            GUIDelete($hGUI)
            Exit
    EndSwitch
Until False

Func PlayAnim()
    Local $iballs = 3
    $hHBmp_BG = _GDIPlus_ThreeBalls($iW, $iH, $iPerc, 5, $iballs)
    $hB = GUICtrlSendMsg($iPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBmp_BG)
    If $hB Then _WinAPI_DeleteObject($hB)
    _WinAPI_DeleteObject($hHBmp_BG)
    ;   Joue sur la vitesse d affichage
    $iPerc += 30
    If $iPerc > (90 * ($iballs + 2)) Then $iPerc = 0
EndFunc   ;==>PlayAnim

Func _GDIPlus_ThreeBalls($iW, $iH, $iPerc, $iRadius = 5, $iballs = 3, $bHBitmap = True)
    Local Const $iDiameter = $iRadius * 2

    Local $tPointF1 = DllStructCreate("float;float")
    Local $pPointF1 = DllStructGetPtr($tPointF1)
    Local $tPointF2 = DllStructCreate("float;float")
    Local $pPointF2 = DllStructGetPtr($tPointF2)
    DllStructSetData($tPointF1, 1, $iDiameter)
    DllStructSetData($tPointF1, 2, 0)
    DllStructSetData($tPointF2, 1, $iDiameter)
    DllStructSetData($tPointF2, 2, $iDiameter)

    Local $hBrushBall2 = DllCall($__g_hGDIPDll, "uint", "GdipCreateLineBrush", "ptr", $pPointF1, "ptr", $pPointF2, "uint", 0xFFcecbca, "uint", 0xFFf2eeed, "int", 1, "int*", 0)
    $hBrushBall2 = $hBrushBall2[6]

    Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH)

    Local Const $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    _GDIPlus_GraphicsSetSmoothingMode($hCtxt, 2)
    _GDIPlus_GraphicsSetPixelOffsetMode($hCtxt, $GDIP_PIXELOFFSETMODE_HIGHQUALITY)

    Local Const $hBrushBall1 = _GDIPlus_BrushCreateSolid("0xFF" & $sThemeColor)

    _GDIPlus_GraphicsFillRect($hCtxt, 0, 0, $iW, $iH, $hBrushBall1)

    Local $aPos[$iballs][3]
    Local Static $aCircle[$iballs + 1]
    For $i = 0 To $iballs - 1
        $aPos[($iballs - 1) - $i][0] = ($iW / 2) - (($iDiameter * 3) * ($i + 1)) + (($iballs - 1) / 2 * ($iDiameter * 3)) + $iDiameter * 3
        $aPos[($iballs - 1) - $i][1] = ($iH - $iRadius) / 2
        _GDIPlus_GraphicsFillCircle($hCtxt, $aPos[($iballs - 1) - $i][0], $aPos[($iballs - 1) - $i][1], $iRadius, $hBrushBall1)
    Next


    Local $i, $fDH, $height
    For $i = 0 To $iballs - 1

        Local $iBallValue = $iPerc - ($i * 90)
        If ($iBallValue < 0 Or $iBallValue > 180) Then $iBallValue = 0

        $fDH = Sin($iBallValue * $PI / 180) / 2


        $height = $iRadius * 10
;~      _GDIPlus_GraphicsFillCircle($hCtxt, $aPos[$i][0], $aPos[$i][1]  - ($height * abs($fDH)), $iRadius  , $hBrushBall2)

        _GDIPlus_GraphicsFillCircle($hCtxt, $aPos[$i][0], $aPos[$i][1], $iRadius + $iRadius * $fDH, $hBrushBall2)

    Next

    _GDIPlus_GraphicsDispose($hCtxt)
    _GDIPlus_BrushDispose($hBrushBall1)
    _GDIPlus_BrushDispose($hBrushBall2)
;~  _GDIPlus_PenDispose($hPen)

    If $bHBitmap Then
        Local $hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
        _GDIPlus_BitmapDispose($hBitmap)
        Return $hHBITMAP
    EndIf
    Return $hBitmap
EndFunc   ;==>_GDIPlus_ThreeBalls



Func _GDIPlus_GraphicsFillCircle($hCtxt, $iXCenterPos, $iCenterYPos, $iRadius, $hBrush)
    _GDIPlus_GraphicsFillEllipse($hCtxt, $iXCenterPos - $iRadius, $iCenterYPos - $iRadius, $iRadius * 2, $iRadius * 2, $hBrush)
EndFunc   ;==>_GDIPlus_GraphicsFillCircle

 

  • Like 1

Share this post


Link to post
Share on other sites
kaz

An other dots animation :

#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <Memory.au3>
#include <GDIPlus.au3>
#include <WindowsConstants.au3>

#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <TrayConstants.au3>


Global Const $sExcelColor = "217346", $sWordColor = "2b579a", $sOutlookColor = "B7472A"
Global Const $sThemeColor = $sOutlookColor

Local Const $PI = 3.141592653589793


Global Const $hDwmApiDll = DllOpen("dwmapi.dll")
Global $sChkAero = DllStructCreate("int;")
DllCall($hDwmApiDll, "int", "DwmIsCompositionEnabled", "ptr", DllStructGetPtr($sChkAero))
Global $bAero = DllStructGetData($sChkAero, 1)
Global $fStep = 0.02
If Not $bAero Then $fStep = 1.25

_GDIPlus_Startup()

Global $iW = 442, $iH = 30

$hGUI = GUICreate("Office", $iW, 252, @DesktopWidth / 2.95, @DesktopHeight / 3.2, $WS_POPUP)

GUISetBkColor("0x" & $sThemeColor)


;GUISetBkColor(0xB7472A)
;GUISetBkColor(0x2b579a) ;Word Blue
;~ GUISetBkColor(0x217346) ;Excel Green
$Label1 = GUICtrlCreateLabel("SciTE4AutoIt3", 8, 8, 102, 21)
GUICtrlSetFont(-1, 10, 400, 0, "Segoe UI Light")
GUICtrlSetColor(-1, 0xFFFFFF)
$Label2 = GUICtrlCreateLabel("AutoIt 247", 64, 72, 314, 75, BitOR($SS_CENTER, $SS_CENTERIMAGE))
GUICtrlSetFont(-1, 40, 400, 0, "Segoe UI Light")
GUICtrlSetColor(-1, 0xFFFFFF)
$Label3 = GUICtrlCreateLabel("Starting...", 10, 205, 54, 21)
GUICtrlSetFont(-1, 10, 400, 0, "Segoe UI Light")
GUICtrlSetColor(-1, 0xFFFFFF)
$Label4 = GUICtrlCreateLabel("r", 410, 4, 20, 21)
GUICtrlSetFont(-1, 12, 400, 0, "Webdings")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetTip(-1, "Closes the splash screen.")
$Label5 = GUICtrlCreateLabel("0", 385, 0, 20, 21)
GUICtrlSetFont(-1, 12, 400, 0, "Webdings")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetTip(-1, "Minimises the splash screen.")
GUISetState(@SW_SHOW)

Global Const $iPic = GUICtrlCreatePic("", 0, 150, $iW, $iH)
GUICtrlSetState(-1, $GUI_DISABLE)
WinSetTrans($hGUI, "", 0)
GUISetState()
Global $hHBmp_BG, $hB, $iSleep = 20
GUIRegisterMsg($WM_TIMER, "PlayAnim")
DllCall("user32.dll", "int", "SetTimer", "hwnd", $hGUI, "int", 0, "int", $iSleep, "int", 0)


global $iballs = 5
global $aPos[$iballs][3]

For $i = 0 To $iballs - 1
    $aPos[($iballs - 1) - $i][0] = -10
    $aPos[($iballs - 1) - $i][1] = $iH / 2
Next
$aPos[0][2] = 1


Global $z, $iPerc
For $z = 1 To 255 Step $fStep
    WinSetTrans($hGUI, "", $z)
Next

Do
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE, $Label4
            ConsoleWrite("Exit")
            GUIRegisterMsg($WM_TIMER, "")
            _WinAPI_DeleteObject($hHBmp_BG)
            _GDIPlus_Shutdown()
            For $z = 255 To 1 Step -$fStep
                WinSetTrans($hGUI, "", $z)
            Next
            GUIDelete($hGUI)
            Exit
    EndSwitch
Until False

Func PlayAnim()

    $hHBmp_BG = _GDIPlus_LinearBalls($iW, $iH, $iPerc, 3, $iballs)
    $hB = GUICtrlSendMsg($iPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBmp_BG)
    If $hB Then _WinAPI_DeleteObject($hB)
    _WinAPI_DeleteObject($hHBmp_BG)


    If $aPos[$iballs - 1][2] = 2 Then
        For $i = 0 To $iballs - 1
            $aPos[$i][0] = - 10
            $aPos[$i][2] = 0
        Next

        $aPos[0][2] = 1
    EndIf
EndFunc   ;==>PlayAnim

Func _GDIPlus_LinearBalls($iW, $iH, $iPerc, $iRadius = 5, $iballs = 3, $bHBitmap = True)
    Local Const $iDiameter = $iRadius * 2

    Local $tPointF1 = DllStructCreate("float;float")
    Local $pPointF1 = DllStructGetPtr($tPointF1)
    Local $tPointF2 = DllStructCreate("float;float")
    Local $pPointF2 = DllStructGetPtr($tPointF2)
    DllStructSetData($tPointF1, 1, $iDiameter)
    DllStructSetData($tPointF1, 2, 0)
    DllStructSetData($tPointF2, 1, $iDiameter)
    DllStructSetData($tPointF2, 2, $iDiameter)

    Local $hBrushBall2 = DllCall($__g_hGDIPDll, "uint", "GdipCreateLineBrush", "ptr", $pPointF1, "ptr", $pPointF2, "uint", 0xFFcecbca, "uint", 0xFFf2eeed, "int", 1, "int*", 0)
    $hBrushBall2 = $hBrushBall2[6]

    Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH)

    Local Const $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    _GDIPlus_GraphicsSetSmoothingMode($hCtxt, 2)
    _GDIPlus_GraphicsSetPixelOffsetMode($hCtxt, $GDIP_PIXELOFFSETMODE_HIGHQUALITY)

    Local Const $hBrushBall1 = _GDIPlus_BrushCreateSolid("0xFF" & $sThemeColor)

    _GDIPlus_GraphicsFillRect($hCtxt, 0, 0, $iW, $iH, $hBrushBall1)


    Local $i, $fDH, $height
    local $ixPartScreen = $iW/16

    For $i = 0 To $iballs - 1

        Local $iSpeed, $x
        if $aPos[$i][2] = 1 then
            if $aPos[$i][0] < $ixPartScreen * 7 Then
                $x = $aPos[$i][0]
                if $x < 0 then $x = 0
                $iSpeed = 5 + (20 * ((($ixPartScreen * 7) - $x) * 100 ) / ($ixPartScreen * 7)) / 100
            ElseIf $aPos[$i][0] > ($ixPartScreen * 9 - ($i * $iRadius * 1.5))  Then
                $iSpeed = 20 + (60 * ((($aPos[$i][0] - $ixPartScreen * 9)) * 100 ) / ($ixPartScreen * 9)) / 100
            Else
                $iSpeed = 2
            EndIf


            if $i > 0 and $aPos[$i - 1][0] - ($aPos[$i][0] + $iSpeed) < 13 and $aPos[$i][0] < $ixPartScreen * 9 Then
                $aPos[$i][0] = $aPos[$i - 1][0] - 13
            Else
                $aPos[$i][0] = $aPos[$i][0]  + $iSpeed
            EndIf

        EndIf

        if $i < $iballs - 1 Then
            if $aPos[$i][0] > $ixPartScreen * 3 then $aPos[$i + 1][2] = 1
        EndIf

        If $aPos[$i][0] > $iW + $iRadius  Then
            $aPos[$i][2] = 0
            if $i = $iballs - 1 Then $aPos[$i][2] = 2
        EndIf


        _GDIPlus_GraphicsFillCircle($hCtxt, $aPos[$i][0], $aPos[$i][1], $iRadius , $hBrushBall2)

    Next

    _GDIPlus_GraphicsDispose($hCtxt)
    _GDIPlus_BrushDispose($hBrushBall1)
    _GDIPlus_BrushDispose($hBrushBall2)



    If $bHBitmap Then
        Local $hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
        _GDIPlus_BitmapDispose($hBitmap)
        Return $hHBITMAP
    EndIf
    Return $hBitmap
EndFunc   ;==>_GDIPlus_LinearBalls



Func _GDIPlus_GraphicsFillCircle($hCtxt, $iXCenterPos, $iCenterYPos, $iRadius, $hBrush)
    _GDIPlus_GraphicsFillEllipse($hCtxt, $iXCenterPos - $iRadius, $iCenterYPos - $iRadius, $iRadius * 2, $iRadius * 2, $hBrush)
EndFunc   ;==>_GDIPlus_GraphicsFillCircle

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
argumentum
Posted (edited)

in

WinSetTrans($hGUI, "", 0) ; <---- change to 1 to avoid the initial flash  ;)
GUISetState()

change the 0 to a 1, to avoid the initial flash  ;)

PS: Also this looks better too

ConsoleWrite("Exit")
            For $z = 255 To 1 Step -$fStep
                WinSetTrans($hGUI, "", $z)
            Next
            GUIRegisterMsg($WM_TIMER, "")
            _WinAPI_DeleteObject($hHBmp_BG)
            _GDIPlus_Shutdown()
            GUIDelete($hGUI)

 

Edited by argumentum
  • Like 2

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

  • Similar Content

    • Bllee
      By Bllee
      every time i press "delete button" delete a line, but i can't add new line with info. the id line write normally but i can't change or add new info
      obs: looking at the "includes" one realizes that already tried of everything that knew
      my code
      #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiListView.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <MsgBoxConstants.au3> #include <WinAPI.au3> #include <StringConstants.au3> #include <Array.au3> #include <GuiListBox.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 612, 480, 192, 154) $MenuItem1 = GUICtrlCreateMenu("&Arquivo") $MenuItem2 = GUICtrlCreateMenuItem("Salvar Ctrl+S", $MenuItem1, $SS_CENTER) $MenuItem4 = GUICtrlCreateMenuItem("Carregar Ctrl+O", $MenuItem1, $SS_CENTER) $MenuItem3 = GUICtrlCreateMenuItem("Salvar Como Shitft+Ctrl+S", $MenuItem1, $SS_CENTER) $Group1 = GUICtrlCreateGroup("", 21, 8, 569, 97, $SS_CENTER) $Input1 = GUICtrlCreateInput("ID COR", 122, 32, 97, 21, $SS_CENTER) $Input2 = GUICtrlCreateInput("REGIÃO", 138, 64, 249, 21, $SS_CENTER) $Input3 = GUICtrlCreateInput("Label", 264, 30, 121, 21, $SS_CENTER) $Label1 = GUICtrlCreateLabel("Label", 232, 32, 30, 17, $SS_CENTER) $Button1 = GUICtrlCreateButton("Capturar Cor", 42, 30, 75, 25, $SS_CENTER) $Button2 = GUICtrlCreateButton("Capturar Região", 42, 62, 91, 25, $SS_CENTER) $Button3 = GUICtrlCreateButton("ADD", 442, 24, 113, 33) $Button5 = GUICtrlCreateButton("Delet", 442, 64, 113, 33) $Group2 = GUICtrlCreateGroup("Editar ID selecionado", 8, 384, 601, 57, $SS_CENTER) $Input7 = GUICtrlCreateInput("ID", 10, 402, 40,21, $SS_CENTER) $Input4 = GUICtrlCreateInput("COR", 51, 402, 121, 21, $SS_CENTER) $Input5 = GUICtrlCreateInput("REGIÃO", 173, 402, 249, 21, $SS_CENTER) $Input6 = GUICtrlCreateInput("LABEL", 423, 402, 121, 21, $SS_CENTER) $Button4 = GUICtrlCreateButton("\/", 544, 400, 30, 25, $SS_CENTER) $Button6 = GUICtrlCreateButton("/\", 574, 400, 30, 25, $SS_CENTER) ; Add column Global $id = Int(0) $List1 = GUICtrlCreateListView("",5, 120, 601, 253, $SS_CENTER) _GUICtrlListView_AddColumn($List1, "ID",40) _GUICtrlListView_AddColumn($List1, "COR",100) _GUICtrlListView_AddColumn($List1, "COORDENADA",305) _GUICtrlListView_AddColumn($List1, "LABEL",150) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $MenuItem2 MsgBox($MB_SYSTEMMODAL, "ctrl + s", "Nothing Here",1) Case $MenuItem3 MsgBox($MB_SYSTEMMODAL, "shift+ctrl s", "Nothing Here",1) Case $MenuItem4 MsgBox($MB_SYSTEMMODAL, "ctrl + o", "Nothing Here",1) Case $Button1 MsgBox($MB_SYSTEMMODAL, "Capturar cor", "Aperte espaço para capturar a cor") GUICtrlSetData($Input1,MouseColor()) Case $Button2 MsgBox($MB_SYSTEMMODAL, "capturar região", "Aperte espaço para capturar a posição inicial") local $mouse = MouseGetPos() $x_init = $mouse[0] $y_init = $mouse[1] MsgBox($MB_SYSTEMMODAL, "capturar região", "Aperte espaço para capturar a posição final") local $mouse = MouseGetPos() $x_end = $mouse[0] $y_end = $mouse[1] GUICtrlSetData($Input2,$x_init&','&$y_init&' ; '&$x_end&','&$y_end) Case $Button3 _GUICtrlListView_AddItem($List1, $id, 1) ; id _GUICtrlListView_AddSubItem($List1, $id, GUICtrlRead($Input1), 1, 1) ;cor _GUICtrlListView_AddSubItem($List1, $id, GUICtrlRead($Input2), 2, 1) ;coordenada _GUICtrlListView_AddSubItem($List1, $id, GUICtrlRead($Input3), 3, 1) ;label $id= $id + 1 Case $Button4 $Item = _GUICtrlListView_GetSelectedIndices($List1) $Sid = _GUICtrlListView_GetItem($List1, Number($Item),0) $Scor = _GUICtrlListView_GetItem($List1, Number($Item),1) $Scord = _GUICtrlListView_GetItem($List1, Number($Item),2) $Slabel = _GUICtrlListView_GetItem($List1, Number($Item),3) ; get info GUICtrlSetData($Input7,$Sid[3]) GUICtrlSetData($Input4,$Scor[3]) GUICtrlSetData($Input5,$Scord[3]) GUICtrlSetData($Input6,$Slabel[3]) Case $Button5 _GUICtrlListView_DeleteItemsSelected($List1) Case $Button6 ; give back inf if GUICtrlRead($Input7) <> "ID" Then _GUICtrlListView_SetItem($List1, GUICtrlRead($Input4), GUICtrlRead($Input7),1) ;cor _GUICtrlListView_SetItem($List1, GUICtrlRead($Input5), GUICtrlRead($Input7),2) ;coordenada _GUICtrlListView_SetItem($List1, GUICtrlRead($Input6), GUICtrlRead($Input7),3) ;coordenada EndIf EndSwitch WEnd Func MouseColor() local $mouse = MouseGetPos() Return Hex(PixelGetColor($mouse[0],$mouse[1]), 6) EndFunc  
    • nacerbaaziz
      By nacerbaaziz
      Hello, dear.
      I am a newbie in autoit language
      I don't master any other programming language.
      I also don't understand how to manage the DLL files
      In addition to all this I am blind, and as we all know the explanations provided for the blind in programming are very few.
      So I'm trying to rely on myself for learning.
      I work hard to design some simple software and tools that make it easier to use computers, as they perform some tasks that may be difficult for the blind.
      I am also looking for the programs that the blind need and cannot use it because it's haven't the compatibility with the screen reader, and i try to design a simple programs that do the same work.
      In these tools and programs I have to deal directly with screen readers, when i must to forcing these programs to read some processes and tasks that it cannot be read in normal mode.
      To force these programs to read, I have to deal with the API files.
      And as I said, I'm very weak in managing DLLs.
      So I hope you'll try to help me, please.
      I did a lot of research until I found the API file to manage the free screen reader (NVDA).
      It is open source
      It is based on CPP language and Python
      And I don't understand the both languages.
      For this I decided to put you an API file link here which is attached with it examples, source and DLL file
      I hope you can help me by convert these functions to AutoIt include file
      I offer you a very serious apology if the participation is a violation of the laws.
      I wish I could find here someone to help me.
      To download the file please click on this link
      http://www.nvda-project.org/nvdaControllerClient/nvdaControllerClient_20100219.7z
      and To download the free screen reader,  please following this link
      https://www.nvaccess.org/download/

      I repeat my apologies and thanks in advance.
       
    • FrancescoDiMuro
      By FrancescoDiMuro
      Good evening everyone
      First, I want to apologize with you for the title not very clear, but I thought a little bit on which title to set at the thread, and this is the one that came in mind.
      Now, let me explain what I'm trying to understand.

      I am making an application ( with n clients ), with an SQLite Database, which has a Main form, and n sub-forms... 
      Since these sub-forms are called several times, because they are used to add or update records to the Database, I put the code that generates the GUI of these sub-forms in Functions.
      There are two sub-forms which are "treated" as two main forms, since even them have n sub-forms, which perform various tasks.
      Where am I stucked?

      For the Main form I created a Status Bar, in order to display messages ( add/delete/update/search results ), and it works perfectly with all the forms which don't have other sub-forms.
      For the two forms, which indeed have n sub-forms, I created two separated Status Bars, which are (re)created everytime I call the function that then displays the form.
      Practically, I can't set icons to these two Status Bars, and I don't know why.
      I'm really sorry that I don't feel clear enough, so, here you are an example of what I am saying.
      I recreated exactly what my script does:
      #include <GuiButton.au3> #include <GUIConstantsEx.au3> #include <GuiStatusBar.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) Global $frmSubForm, _ $txtSubFormField, _ $sbSubFormStatusBar, _ $objSB_IconError = _WinAPI_LoadShell32Icon(109), _ $objSB_IconInformation = _WinAPI_LoadShell32Icon(277) #Region ### START Koda GUI section ### Form= $frmMainForm = GUICreate("Main Form", 300, 300, -1, -1) GUISetOnEvent($GUI_EVENT_CLOSE, "ExitApplication") $sbMainStatusBar = _GUICtrlStatusBar_Create($frmMainForm) $btnCreateSubForm = GUICtrlCreateButton("Create Sub Form", 105, 110, 75, 41, BitOR($BS_CENTER,$BS_VCENTER,$BS_MULTILINE)) GUICtrlSetOnEvent(-1, "GenerateSubForm") GUICtrlSetFont(-1, 10, 400, 0, "Arial") _GUICtrlStatusBar_SetSimple($sbMainStatusBar) _GUICtrlStatusBar_SetText($sbMainStatusBar, "") GUISetState(@SW_SHOW, $frmMainForm) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func ExitApplication() Exit EndFunc Func GenerateSubForm() #Region ### START Koda GUI section ### Form= $frmSubForm = GUICreate("Sub-Form", 300, 300, -1, -1, -1, -1, $frmMainForm) GUISetOnEvent($GUI_EVENT_CLOSE, "DeleteSubForm") $txtSubFormField = GUICtrlCreateInput("", 0, 0, 100, 20) $btnCheckSubFormField = GUICtrlCreateButton("Check Field", 105, 110, 75, 41, BitOR($BS_CENTER,$BS_VCENTER,$BS_MULTILINE)) GUICtrlSetOnEvent(-1, "CheckSubFormField") GUICtrlSetFont(-1, 10, 400, 0, "Arial") $sbSubFormStatusBar = _GUICtrlStatusBar_Create($frmSubForm) _GUICtrlStatusBar_SetSimple($sbSubFormStatusBar) _GUICtrlStatusBar_SetText($sbSubFormStatusBar, "") GUISetState(@SW_SHOW, $frmSubForm) GUISetState(@SW_DISABLE, $frmMainForm) #EndRegion ### END Koda GUI section ### EndFunc Func DeleteSubForm() ; Declared Globally => $frmSubForm GUIDelete($frmSubForm) GUISetState(@SW_ENABLE, $frmMainForm) EndFunc Func WriteToStatusBar($sbStatusBar, $objSB_Icon, $strText) _GUICtrlStatusBar_SetIcon($sbStatusBar, 0, $objSB_Icon) _GUICtrlStatusBar_SetText($sbStatusBar, $strText) ConsoleWrite("Icon Handle: " & $objSB_Icon & @CRLF) EndFunc Func CheckSubFormField() ; Declared Globally => $txtSubFormField If GUICtrlRead($txtSubFormField) = "" Then ; Declared Globally => $sbStatusBar WriteToStatusBar($sbSubFormStatusBar, $objSB_IconError, "Field NOK.") Else WriteToStatusBar($sbSubFormStatusBar, $objSB_IconInformation, "Field OK.") EndIf EndFunc The text is set, but icon is not.
      Could someone please tell me why?
      Thanks everyone in advance  

      Best Regards.
    • Reziskonh
      By Reziskonh
      Hi, everybody
      I look for GUI whose behavior similar to the message of an email client or antivirus
      In other words:
          Any PC screen able to calculate the size
          To consider the Task bar size
          To find the lower corner on the right/below and to nestle on it

      Notes:
      In GUI the GUICtrlCreateEdit field (as option) - that can be received and displayed through variable information
      Thanks a lot
      PS
      I use the translator, excuse if something is not clear
       

    • VollachR
      By VollachR
      Hi,
      I'd like to show a progress bar for an operation performed by an external program my script is running silently, I want to show it in a GUI I created using the GUICtrlCreateProgress but I have no idea how to do it.
      The important thing to point out is that there's no way of knowing how long the external program will run, as it is a file splitter and it depends on the size of file it splits and the split parts size.
      Can someone point me in the right direction or give me an example how to do so?
      This is my RunWait command:
      RunWait($MYFILES1 & '\fsplit.exe -split ' & $Size & ' mb ' & $File & " -f " & $File & "." & $extension) It uses multiple variables declared and set earlier in the script, how will I got about having the progress of that command shown using GUICtrlCreateProgress ? Is it possible?
      Thank you.
×