Bonjour.
Je commence doucement avec GDIPlus, donc soyez indulgents siou plait...
Est-il possible de supprimer une forme créée avec les fonctions _GDIPlus_ ?
J'utilise GDIPlus car je ne souhaite pas utiliser d'images externes mais uniquement des couleurs...
Edit : je ne souhaite pas utiliser les labels car j'aimerais utiliser la transparence/opacité
Merci d'avance pour votre aide.
Exemple :
► Afficher le texte
Code : Tout sélectionner
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
$title = "GDIPlus"
$hGUI = GUICreate($title, 270, 200)
GUISetState()
$bt = GUICtrlCreateButton("Supprimer", 200, 10, 60, 25 )
_GDIPlus_Startup()
$hBrush1 = _GDIPlus_BrushCreateSolid()
$hGraphic = _GDIPlus_GraphicsCreateFromHWND( $hGUI )
_GDIPlus_BrushSetSolidColor($hBrush1, 0xFF000000)
$a = _GDIPlus_GraphicsFillRect($hGraphic, 10 , 10 , 180, 180 , $hBrush1)
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
If $msg = $bt Then
MsgBox(0, "", "C'est balot, je sais pas faire")
EndIf
WEnd
_GDIPlus_GraphicsDispose($hBrush1)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_GraphicsDispose($a)
_GDIPlus_Shutdown()
GUIDelete()
Le script, ça fait gagner beaucoup de temps... à condition d'en avoir beaucoup devant soi !