loveau3 Posted May 29, 2010 Share Posted May 29, 2010 (edited) ****************************************************************************************** I hope every one willing to answer my questions friend please yourself first try Run the script in reply. . Otherwise the answer is not take. Not a little effect. . This problem will never answer the questions can not be resolved. . Please try again. Thank you ****************************************************************************************** How to replace the BMP files into PNG files (FOR icons UDF Attention) How to remove the white border for png Thanks !!~~~ ICONS.au3 UDF download in here! http://yashied.narod2.ru/ProjectFiles/Miscellaneous/Icons_Hover.zip expandcollapse popup#Include <GUIConstantsEx.au3> #Include <UDFs\GUICtrlSetOnHover.au3> #Include <UDFs\Icons.au3> Opt('MustDeclareVars', 0) Global $Hold = False $hForm = GUICreate('GUICtrlSetOnHover & Icons UDFs Demonstration', 1050, 500,-1, -1, $WS_POPUP) $Back = GUICtrlCreatePic('', 0, 0, 1050, 500);;;;;;;here i want to use PNG file _SetImage($Back, @ScriptDir & '\Images\background.png') GUICtrlSetState(-1, $GUI_DISABLE) GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST") $ButtonPrev = GUICtrlCreatePic('', 452, 370, 64, 64) GUICtrlSetOnHover(-1, '_Hover', '_Leave', '_Down', '_Up') $ButtonNext = GUICtrlCreatePic('', 535, 370, 64, 64) GUICtrlSetOnHover(-1, '_Hover', '_Leave', '_Down', '_Up') $Pic1 = GUICtrlCreatePic('', 82, 70, 256, 256) GUICtrlSetOnHover(-1, '_Hover', '_Leave') $Pic2 = GUICtrlCreatePic('', 397, 70, 256, 256) GUICtrlSetOnHover(-1, '_Hover', '_Leave') $Pic3 = GUICtrlCreatePic('', 712, 70, 256, 256) GUICtrlSetOnHover(-1, '_Hover', '_Leave') For $i = $ButtonPrev To $Pic3 _Leave($i) Next GUISetState() Do Until GUIGetMsg() = -3 Func _Down($CtrlID) If $Hold Then Return Else $Hold = True EndIf Local $File Switch $CtrlID Case $ButtonPrev $File = 'button_prev_down.png' Case $ButtonNext $File = 'button_next_down.png' EndSwitch _SetImage($CtrlID, @ScriptDir & '\Images\' & $File, $Back) EndFunc ;==>_Down Func _Leave($CtrlID) Local $File Switch $CtrlID Case $ButtonPrev $File = 'button_prev.png' Case $ButtonNext $File = 'button_next.png' Case $Pic1 $File = 'pic1.png' Case $Pic2 $File = 'pic2.png' Case $Pic3 $File = 'pic3.png' EndSwitch _SetImage($CtrlID, @ScriptDir & '\Images\' & $File, $Back) $Hold = False EndFunc ;==>_Leave Func _Hover($CtrlID) Local $File Switch $CtrlID Case $ButtonPrev $File = 'button_prev_hover.png' Case $ButtonNext $File = 'button_next_hover.png' Case $Pic1 $File = 'pic1_hover.png' Case $Pic2 $File = 'pic2_hover.png' Case $Pic3 $File = 'pic3_hover.png' EndSwitch _SetImage($CtrlID, @ScriptDir & '\Images\' & $File, $Back) $Hold = False EndFunc ;==>_Hover Func _Up($CtrlID) _Hover($CtrlID) EndFunc ;==>_Up Func WM_NCHITTEST($hWnd, $iMsg, $iwParam, $ilParam) If ($hWnd = $hForm) And ($iMsg = $WM_NCHITTEST) Then Return $HTCAPTION EndFunc ;==>WM_NCHITTEST background PNG file Edited May 31, 2010 by loveau3 Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 30, 2010 Share Posted May 30, 2010 Use $WS_EX_LAYERED? $WS_EX_TRANSPARENT? those has helped me in the past with PNGs on GUIs [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
MvGulik Posted May 30, 2010 Share Posted May 30, 2010 (edited) whatever Edited February 7, 2011 by MvGulik "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ... Link to comment Share on other sites More sharing options...
loveau3 Posted May 31, 2010 Author Share Posted May 31, 2010 Icons.au3 (Support for Icons UDF Library for AutoIt3) Boss. . I know that I'm using is also a UDF UDF but I want this feature can not be achieved ah. . I hope you answer my own best time to test. . Thank you. Link to comment Share on other sites More sharing options...
loveau3 Posted May 31, 2010 Author Share Posted May 31, 2010 Use $WS_EX_LAYERED?$WS_EX_TRANSPARENT?those has helped me in the past with PNGs on GUIsBoss. . Please try this result can not achieve what I want Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 31, 2010 Share Posted May 31, 2010 is your PNG with a transparent background or is it a white one? maybe its the pictures problem and not the code. [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
loveau3 Posted June 1, 2010 Author Share Posted June 1, 2010 is your PNG with a transparent background or is it a white one? maybe its the pictures problem and not the code.Well then you can try it? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now