Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 01:08

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Transparentes GUI mit .png

Discussion on Transparentes GUI mit .png within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
Darkbanner's Avatar
 
elite*gold: 30
Join Date: May 2010
Posts: 486
Received Thanks: 161
Code:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
#Include <WinAPI.au3>

Global $hGUI, $hImage, $hGraphic, $hImage1

; Create GUI
$hGUI = GUICreate("Show PNG", 600, 760,0,0, BitOR($WS_POPUP,$DS_MODALFRAME,$WS_EX_LAYERED),$WS_EX_ACCEPTFILES);,$DS_SETFOREGROUND))
	GUISetBkColor(0xABCDEF)
	_WinAPI_SetLayeredWindowAttributes($hGUI, 0xABCDEF, 255)

; Load PNG image
_GDIPlus_StartUp()
$hImage   = _GDIPlus_ImageLoadFromFile("gui.png")
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)

GUIRegisterMsg($WM_PAINT, "MY_WM_PAINT")
GUISetState()

; Loop until user exits
do
until GUIGetMsg() = $GUI_EVENT_CLOSE

; Clean up resources
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_ImageDispose($hImage)
_GDIPlus_ShutDown()

; Draw PNG image
Func MY_WM_PAINT($hWnd, $Msg, $wParam, $lParam)
    _WinAPI_RedrawWindow($hGUI, 0, 0, $RDW_UPDATENOW)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 0, 0)
    _WinAPI_RedrawWindow($hGUI, 0, 0, $RDW_VALIDATE)
    Return $GUI_RUNDEFMSG
EndFunc
Sollte normalerweise doch en transparenten hintergrund haben, hat's aber leider nicht...
Wer findet den Fehler?

Greetz Darkbanner.

PUSH!
Darkbanner is offline  
Old 05/21/2012, 22:54   #2

 
Adroxxx's Avatar
 
elite*gold: 15
Join Date: Nov 2005
Posts: 13,021
Received Thanks: 5,323
Pushes sind nicht erlaubt. Nächstes mal gibt es eine Warnung.
Adroxxx is offline  
Old 05/21/2012, 23:13   #3
 
Achat's Avatar
 
elite*gold: 528
Join Date: Jan 2012
Posts: 2,127
Received Thanks: 2,404
WinSetTrans ( "title", "text", transparency )

MfG
Achat is offline  
Reply


Similar Threads Similar Threads
[How To] Transparentes Gui (AutoIt)
07/22/2012 - Coding Tutorials - 11 Replies
Guten Abend Comunnity ich will euch zeigen wir ihr eine Transparente Gui mit AutoIt machen könnt. Das ganze sieht so aus: http://img819.imageshack.us/img819/8323/transparn z.jpg Und so könnte ein Programm aussehen: http://www.fotos-hochladen.net/uploads/hackaeroe5 ufvpm3.jpg also fangen wir an:
Transparentes Gildenlogo
01/26/2012 - Metin2 - 4 Replies
Hey Leute Heute zeig ich euch wie man ein Transparentes Gildenlogo erstellt Nun zum eigentlichen: Gildenzeichen müssen ja im "jpeg" format hochgeladen werden! Was allerdings kaum einer weiss ist, das man es auch als "BitmapDatei" in den Uploadordner reinschmeissen kann, was auch sehr wichtig ist dies zu tun, da Farbwerte minimal verändert werden.
wer erstellt mit transparentes gildenlogo
02/23/2011 - Metin2 - 2 Replies
hallöchen. ich habe probleme beim erstellen von einem transparenten gildenlogo. mit der farbe und bmp-format weiss ich schon. 255/0/255 aber aus i-welchen gründen schaff ich es nicht. Aufgabe: chin/jap-zeichen für freundschaft...... in weiß hintergrund transparent (255/0/255) größe 16x12 pixel
[S] Transparentes Profilbild [B] 10 E*Gold
02/19/2011 - elite*gold Trading - 12 Replies
Hallo Leude, wie der titel schon sagt, suche ich ein Transparentes Profilbild. wär dies für mich machen könnte, bitte per pn melden. Details: -Das Bild sollte so UNGEFÄHR wie mein jetztiges profilbild aussehen nur ohne schrift und transparent. -also es sollte schon homer drauf sein, nur homer :D
Transparentes GM Logo erstellen
10/16/2010 - Metin2 PServer Guides & Strategies - 14 Replies
Einigen von euch ist bestimmt schon aufgefallen wenn man ein GM Logo erstellt und den Hintergrund auf Transparent stellt und es als *.tga abspeichert erscheint ingame das Transparente jedoch in Weiß: http://i41.tinypic.com/f2ouua.png Was braucht ihr? Den locale Ordner FormatFactory Ein Bildbearbeitungsprogramm (Photoshop, Paint.NET, etc.) Einen GM Account oder die Metin2 Console (Für DE bitte hier runterladen:...



All times are GMT +2. The time now is 01:08.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.