[T] Bonne Année 2007 en transparence.
Posté : jeu. 03 janv. 2008 01:07
Message transféré de l'ancien forum.
Auteur : Michel Claveau
Date : 31/12/2006
Citation :
Le script compilé, exécutable est dispo ici : http://mclaveau.com/gvrac/2007.exe
Il affiche 2007 durant 8 secondes.
Executable + Sources disponibles ici
Auteur : Michel Claveau
Date : 31/12/2006
Citation :
Le script compilé, exécutable est dispo ici : http://mclaveau.com/gvrac/2007.exe
Il affiche 2007 durant 8 secondes.
Code : Tout sélectionner
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.2.12.0
Michel Claveau Informatique http://mclaveau.com
#ce ----------------------------------------------------------------------------
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#include <Constants.au3>
#NoTrayIcon
FileInstall(".\2007.bmp", "C:\2007.bmp")
FileInstall(".\BMP2RGN.dll", "C:\windows\system32\BMP2RGN.dll")
$x = 100
$y = 80
$gui = GUICreate("", 537, 227, $x, $y, $WS_POPUP)
GUISetBkColor(0x000000)
$graf = GUICtrlCreatePic("C:\2007.bmp", 0, 0, 537, 227)
$a = DllCall(".\BMP2RGN.dll", "int", "BMP2RGN", _
"str", "C:\2007.bmp", _
"int", 0, _
"int", 0, _
"int", 0)
SetWindowRgn($gui, $a[0])
GUISetState()
$duree = 8
While 1
$msg = GUIGetMsg()
If $msg = $graf Then
$duree = 0
ExitLoop
EndIf
If $duree > 0 Then
$duree = $duree - 1
Sleep(1000)
Else
ExitLoop
EndIf
WEnd
GUIDelete()
Exit
Func SetWindowRgn($h_win, $rgn)
DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $rgn, "int", 1)
EndFunc ;==>SetWindowRgn