hi leute,
ich suche eine möglichkeit den hintergrund einer gui halbwegs transparent zu machen,
also nicht komplett transparent.
habe nur möglichkeiten gefunden den hintergrund komplett transparent zu machen..
hoffe ihr könnt mir helfen, danke
hi leute,
ich suche eine möglichkeit den hintergrund einer gui halbwegs transparent zu machen,
also nicht komplett transparent.
habe nur möglichkeiten gefunden den hintergrund komplett transparent zu machen..
hoffe ihr könnt mir helfen, danke
WinSetTrans
Ich denke er meint ein Bild transparent machen.
Wenn nein , dann habe ich es falsch interpretiert.
ja genau!
ich will nur den hintergrund halb transparent haben
(buttons, labels, etc sollen normal bleiben)
habe es im moment komplett transparent mit:
[autoit]$gui = GUICreate("Form1", 160, 90, 0, 450, $WS_POPUP, $WS_EX_LAYERED)
GUICtrlCreatePic(@TempDir & "\files\template.gif", 0, 0, 160, 90)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
Tut mir leid , das weiß ich nicht.
Du bist der Frayzer aus cpg richtig?
Ok , ich weiß doch ne Möglichkeit. Du könntest Photoshop starteh nalssen und dann mit (control)clicks die Transparenz runterschrauben. Oder bevor du das Script schreibst setzt du die Trans. runter und benutzt FileInstall().
ja der bin ich
ok das problem ist, dass ich kein photoshop habe
Hehe , dann kensnt du mich bestimmt von früher von dort^^.
Naja , dann frag in CPG den Burny209 oder noch besser trigger^^
hehe ok, danke dir, werde mal schauen ob die sowas machen
bin erstmal ne weile weg. wenn jemandem noch was einfällt bin ich ihm dankbar
Die Transparens von Bildern kann/sollte jeder Noob runterstellen können mit Photoshop/Gimp/Paint.net !
Also sag ihn einfach "hey , kansnt du mir bitte von diesem Bild die Transparenz auf ??? stellen und als bild.??? speichern."
Die Transparens von Bildern kann/sollte jeder Noob runterstellen können mit Photoshop/Gimp/Paint.net !
Ich bezweifele, dass das was bringt. Warum? - Der Hintergrund ist die GUI, darauf pappst du ein Bild. Ist dieses semitransparent, dann siehst du die GUI dadrunter - nicht den Windows-Hintergrund.
Es gibt ein, wenn auch aufwändige, Variante.
- Master-GUI mit Hintergrundbild erstellen
- Transparenz setzen
- für JEDES Control ein Child-GUI in Control-größe
Dann sind alle Controls gut sichtbar und der Hintergrund ist transparent.
Oder wie bei den PNG-GUIs mit layered MDI-Child
#include <WindowsConstants.au3>
$Parent = GUICreate("BackGround",200,200)
GUICtrlCreatePic("C:\WINDOWS\Zapotek.bmp",0,0,200,200)
GUISetState()
WinSetTrans($Parent,"",150)
$gui = GUICreate("Child",200,200,0,0,$WS_POPUP,$WS_EX_LAYERED+$WS_EX_MDICHILD,$Parent)
GUISetBkColor(0x010203)
_WinAPI_SetLayeredWindowAttributes($gui,0x010203)
GUICtrlCreateLabel("Es ist transparent ;)",10,10,90,20)
$butt = GUICtrlCreateButton("OKOKOK",30,40,90,30)
GUISetState()
[/autoit] [autoit][/autoit] [autoit]While 1
Switch GUIGetMsg()
Case -3
Exit
Case $butt
MsgBox(0, '', "Button")
EndSwitch
WEnd
;===============================================================================
;
; Function Name: _WinAPI_SetLayeredWindowAttributes
; Description:: Sets Layered Window Attributes:) See MSDN for more informaion
; Parameter(s):
; $hwnd - Handle of GUI to work on
; $i_transcolor - Transparent color
; $Transparency - Set Transparancy of GUI
; $isColorRef - If True, $i_transcolor is a COLORREF( 0x00bbggrr ), else an RGB-Color
; Requirement(s): Layered Windows
; Return Value(s): Success: 1
; Error: 0
; @error: 1 to 3 - Error from DllCall
; @error: 4 - Function did not succeed - use
; _WinAPI_GetLastErrorMessage or _WinAPI_GetLastError to get more information
; Author(s): Prog@ndy
;
; Link : @@MsdnLink@@ SetLayeredWindowAttributes
; Example : Yes
;===============================================================================
;
Func _WinAPI_SetLayeredWindowAttributes($hwnd, $i_transcolor, $Transparency = 255, $dwFlages = 0x03, $isColorRef = False)
If $dwFlages = Default Or $dwFlages = "" Or $dwFlages < 0 Then $dwFlages = 0x03
If Not $isColorRef Then
$i_transcolor = Hex(String($i_transcolor), 6)
$i_transcolor = Execute('0x00' & StringMid($i_transcolor, 5, 2) & StringMid($i_transcolor, 3, 2) & StringMid($i_transcolor, 1, 2))
EndIf
Local $Ret = DllCall("user32.dll", "int", "SetLayeredWindowAttributes", "hwnd", $hwnd, "long", $i_transcolor, "byte", $Transparency, "long", $dwFlages)
Select
Case @error
Return SetError(@error, 0, 0)
Case $Ret[0] = 0
Return SetError(4, _WinAPI_GetLastError(), 0)
Case Else
Return 1
EndSelect
EndFunc ;==>_WinAPI_SetLayeredWindowAttributes
danke, genau soetwas habe ich gesucht!