#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
#Include <WinAPI.au3>
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", 348, 308, -1, -1, BitOR($WS_MINIMIZEBOX,$WS_POPUP,$WS_GROUP), BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE,$WS_EX_LAYERED ))
_GDIPlus_StartUp()
$hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir&"\image.png")
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($Form1)
WinSetTrans($Form1, "", 0);
GUISetState(@SW_SHOW,$Form1)
For $i = 0 To 255 Step 2
_WinAPI_RedrawWindow($Form1, 0, 0, $RDW_UPDATENOW)
_GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 0, 0)
_WinAPI_RedrawWindow($Form1, 0, 0, $RDW_VALIDATE)
WinSetTrans($Form1, "", $i);Прозрачность 0-255
Sleep(10)
Next
Sleep(2000)
For $i = 255 To 0 Step -2
_WinAPI_RedrawWindow($Form1, 0, 0, $RDW_UPDATENOW)
_GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 0, 0)
_WinAPI_RedrawWindow($Form1, 0, 0, $RDW_VALIDATE)
WinSetTrans($Form1, "", $i);Прозрачность 0-255
Sleep(10)
Next
GUIDelete ($Form1 ) ;Удалить окно
Global $Form2 = GUICreate("Form2", 600, 400, -1, -1)
GUISetState(@SW_SHOW,$Form2)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
; Clean up resources
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_ImageDispose($hImage)
_GDIPlus_ShutDown()