@progandy
Oh, hab garnicht gemerkt das du was gepostet hast!
Das fuck ich mir gleich mal an!
So, man hat mir im Englischen forum geholfen!
Da hab ich jetzt nur noch ein Problem!
Spoiler anzeigen
#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]$hWin = GUICreate("Test", 200, 200)
GUISetBkColor(0x00FF00, $hWin)
$hPic = GUICtrlCreatePic("button.gif", 90, 90, 21, 21)
[/autoit] [autoit][/autoit] [autoit]GUISetState()
[/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]$iMsg = GUIGetMsg()
[/autoit] [autoit][/autoit] [autoit]Switch $iMsg
Case $GUI_EVENT_CLOSE
Exit
Case $hPic
$iOldOpt = Opt("MouseCoordMode", 2)
$aPos = MouseGetPos()
If _PointInEllipse($aPos[0], $aPos[1], 90, 90, 21, 21) Then MsgBox(0, "", "Hit")
Opt("MouseCoordMode", $iOldOpt)
EndSwitch
WEnd
[/autoit] [autoit][/autoit] [autoit]Func _PointInEllipse($xPt, $yPt, $xTL, $yTL, $w, $h)
Local $bInside = False, $a = $w / 2, $b = $h / 2
Local $c1X, $c2X, $dist, $xc = $xTL + $a, $yc = $yTL + $b
$c1X = $xc - ($a ^ 2 - $b ^ 2) ^ (1 / 2); 1st focal point x position
$c2X = $xc + ($a ^ 2 - $b ^ 2) ^ (1 / 2); 2nd focal point x position
$dist = (($xPt - $c1X) ^ 2 + ($yPt - $yc) ^ 2) ^ 0.5 + (($xPt - $c2X) ^ 2 + ($yPt - $yc) ^ 2) ^ 0.5
If $dist <= $w Then $bInside = Not $bInside
Return $bInside
EndFunc ;==>_PointInEllipse
Wie bekomme ich das Pic transparent? Also das bild vom Button ist transparent, aner bei mir zeigt er das nicht an ![]()