#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <winapi.au3>
#include <GDIPlus.au3>
#include <Sound.au3>
Global Const $AC_SRC_ALPHA = 1
_GDIPlus_Startup()
$hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir&"\you.png")
$width = _GDIPlus_ImageGetWidth($hImage)
$height = _GDIPlus_ImageGetHeight($hImage)
$gui = GUICreate("", $width, $height, -1, -1, $WS_POPUP, $WS_EX_LAYERED, GUICreate(""))
SetBitmap($gui, $hImage, 255)
GUISetState()
WinSetOnTop($gui, "", 1)
Func SetBitmap($hGUI, $hImage, $iOpacity)
Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend
$hScrDC = _WinAPI_GetDC(0)
$hMemDC = _WinAPI_CreateCompatibleDC($hScrDC)
$hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
$hOld = _WinAPI_SelectObject($hMemDC, $hBitmap)
$tSize = DllStructCreate($tagSIZE)
$pSize = DllStructGetPtr($tSize)
DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth($hImage))
DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage))
$tSource = DllStructCreate($tagPOINT)
$pSource = DllStructGetPtr($tSource)
$tBlend = DllStructCreate($tagBLENDFUNCTION)
$pBlend = DllStructGetPtr($tBlend)
DllStructSetData($tBlend, "Alpha", $iOpacity)
DllStructSetData($tBlend, "Format", $AC_SRC_ALPHA)
_WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA)
_WinAPI_ReleaseDC(0, $hScrDC)
_WinAPI_SelectObject($hMemDC, $hOld)
_WinAPI_DeleteObject($hBitmap)
_WinAPI_DeleteDC($hMemDC)
EndFunc ;==>SetBitmap
$i=@DesktopWidth
$s=0
$b=300
Local $aSound=_SoundOpen(@ScriptDir&"\youling.mp3")
_SoundPlay($aSound)
While 1
If _SoundStatus($aSound)="stopped" Then _SoundPlay($aSound)
Sleep(5)
If $s<300 Then
WinMove($gui,"",$i,$s)
$s+=1
If $s=300 Then $b=300
Else
WinMove($gui,"",$i,$b)
$b-=1
If $b=0 Then $s=0
EndIf
$i-=1
If $i=-400 Then
_SoundClose($aSound)
Exit
EndIf
WEnd