goldenix Posted June 9, 2008 Posted June 9, 2008 This is really cool, Someone really really Bored person should make an UDF for this My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Kip Posted June 9, 2008 Posted June 9, 2008 (edited) I'm not bored... expandcollapse popup#include <GDIPlus.au3> #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> _GDIPlus_Startup() $pngSrc = @ScriptDir & "\LaunchySkin.png" $GUI = _GUICreate_Alpha("Title", $pngSrc) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd _GDIPlus_Shutdown() Func _GUICreate_Alpha($sTitle, $sPath, $iX=-1, $iY=-1, $iOpacity=255) Local $hGUI, $hImage, $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend $hImage = _GDIPlus_ImageLoadFromFile($sPath) $width = _GDIPlus_ImageGetWidth($hImage) $height = _GDIPlus_ImageGetHeight($hImage) $hGUI = GUICreate($sTitle, $width, $height, $iX, $iY, $WS_POPUP, $WS_EX_LAYERED) $hScrDC = _WinAPI_GetDC(0) $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC) $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap) $tSize = DllStructCreate($tagSIZE) $pSize = DllStructGetPtr($tSize) DllStructSetData($tSize, "X", $width) DllStructSetData($tSize, "Y", $height) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, "Alpha", $iOpacity) DllStructSetData($tBlend, "Format", 1) _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, 2) _WinAPI_ReleaseDC(0, $hScrDC) _WinAPI_SelectObject($hMemDC, $hOld) _WinAPI_DeleteObject($hBitmap) _WinAPI_DeleteObject($hImage) _WinAPI_DeleteDC($hMemDC) EndFunc ;==>SetBitmap Edited June 9, 2008 by Kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
tic Posted June 9, 2008 Posted June 9, 2008 (edited) you get the dimensions twice and just to be annoying... $hImage = _GDIPlus_ImageLoadFromFile($sPath) what does the h stand for in hImage? Sorry! Edited June 9, 2008 by tic
Kip Posted June 9, 2008 Posted June 9, 2008 (edited) Some examples: $hImage = Handle-Image $sTitle = String-Title $iStyle = Integer-Style $pSource = Pointer-Source Edited June 9, 2008 by Kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
tic Posted June 9, 2008 Posted June 9, 2008 Ah I now see where your confusion lies. I looked into GDIPlus.au3 and see that it says:Return values .: Success - Handle to the new image objectwheras that is not true...http://msdn.microsoft.com/en-us/library/ms534041(VS.85).aspxGpStatus WINGDIPAPI GdipLoadImageFromFile(GDIPCONST WCHAR* filename, GpImage **image)You can clearly see that it returns a gdi+ bitmap rather than a gdi bitmap, this being a pointer rather than a handle. So the return value is eitherpBitmap or pImage Just thought I'd share this as it appears every single person has written it incorrectly lol
Dizzy Posted June 15, 2008 Posted June 15, 2008 Hi! i'm running against the wall I'm trying to reduce the high of the combobox ('cause i've so many icons on my desktop ...) Need someone to show me the way Thanks Dizzy
Skrip Posted June 21, 2008 Posted June 21, 2008 (edited) VERY nice. Would it be possible to do a transparent animation, like, an animated background? Edited June 21, 2008 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
StAbb Posted June 24, 2008 Posted June 24, 2008 (edited) Awesome job man, a UDF would be an awesome challenge though. Edited June 24, 2008 by StAbb
Valuater Posted June 24, 2008 Posted June 24, 2008 FYI, the original was already updated for AutoIt v3.2.12.0:http://www.autoitscript.com/forum/index.php?showtopic=47651It's nice to see some new examples though. Keep up the good work!Good job ob this lod3n ...and a good attitude too!!!8)
Flop Posted December 3, 2008 Posted December 3, 2008 how to draw a another png picture in the gui ? thanks
akshay Posted February 1, 2009 Posted February 1, 2009 i dont have A3LGDIPlus.au3 can some body just upload it i tried the beta eddition it also didnt have it thankx
BrettF Posted February 1, 2009 Posted February 1, 2009 Erm Hi,How about you do something called READING THE FULL TOPIC. You didn't even need to do that, you could just use this, which is on this page... #533637Cheers,Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
akshay Posted February 4, 2009 Posted February 4, 2009 i cannot create buttons on the control gui i mean autoit shows them but the dont get clicked or notify $msg please help
tip Posted March 3, 2009 Posted March 3, 2009 Hi to all, Is there a way to use "grey.gif" from the resources? I handled background pngs with zedna's udf but... Thanks in advance [center]MsgBox_Tipped: Eye candy msgboxes/inputboxes/loginboxes. | CreateBlankBox: Semi-transparent layers with borders and rounded corners.[/center]
ProgAndy Posted March 17, 2009 Posted March 17, 2009 Hi to all,Is there a way to use "grey.gif" from the resources? I handled background pngs with zedna's udf but...Thanks in advanceYou won't need the grey.gif. Just set the Nackground color of the child GUI to the color you want to see transparent. Then use_WinAPISetLayeredWindowAttributes to set this color transparent You see, no GIF is needed. *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
hot202 Posted August 20, 2009 Posted August 20, 2009 dose any1 know how to add more .png images to this so they show ontop 2 use as buttons?
meisandy Posted July 23, 2010 Posted July 23, 2010 Hi, a few things: Firstly, well done, its great and exactly what I need but... When I try to implement it the control GUI doesn't display?... I think this is because I'm not using AdlibEnable() and AdlibDisable(), as they don't seem to work! There's a file missing? Please help, ASAP?
Recommended Posts