Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Icons UDF


  • Please log in to reply
68 replies to this topic

#41 Yashied

Yashied

    Happy in Moscow

  • MVPs
  • 2,574 posts

Posted 27 July 2009 - 07:30 AM

this is awesome!!! though is it possible to remove the picture? cause i need this:

i have a Label control...
_setimage () on it works beautifully!!
but then i need the label to be able to have text written on it... Guictrlsetdata(label,'text')
i just used _setimage (label, '') to make it blank... but i dunno how to turn it back into a label control

Why do you need such complexity? Use GUICtrlCreateLabel() for labels and GUICtrlCreatePic() for images.







#42 CodyBarrett

CodyBarrett

    I LOVE Juicy Fruit!!!

  • Active Members
  • PipPipPipPipPipPip
  • 1,225 posts

Posted 27 July 2009 - 04:40 PM

its for a chess game.. the labels are so that an X is placed where the possible moves can be... but with setimage the labels aren't labels anymore

#43 Eatitup86

Eatitup86

    Seeker

  • Normal Members
  • 1 posts

Posted 20 August 2009 - 05:49 AM

I have to say that this is amazing man. This really helped me with a M3 Sakura GUI emulator that I am working on and I really appreciate you sharing your code with everyone.

#44 6105

6105

    Polymath

  • Active Members
  • PipPipPipPip
  • 232 posts

Posted 08 September 2009 - 11:40 AM

i have error (((
i added in "C:\Program Files\AutoIt3\Include" file "Icons.au3"
but me gives error like can't open this file((( "Error open this file" #Include <Icons.au3>

Edited by toader, 08 September 2009 - 11:42 AM.

Die die die my darling

Don't utter a single word

Die die die my darling

Just shut your pretty mouth

I'll be seeing you again

I'll be seeing you

In hell


#45 Yashied

Yashied

    Happy in Moscow

  • MVPs
  • 2,574 posts

Posted 08 September 2009 - 05:22 PM

i have error (((
i added in "C:\Program Files\AutoIt3\Include" file "Icons.au3"
but me gives error like can't open this file((( "Error open this file" #Include <Icons.au3>


I think you are using the Beta. If so, then

C:\Program Files\AutoIt3\Beta\Include

#46 Yashied

Yashied

    Happy in Moscow

  • MVPs
  • 2,574 posts

Posted 27 September 2009 - 08:11 PM

The library has been updated to version 1.6, see post #1 for more information.

Edited by Yashied, 07 November 2009 - 12:48 AM.


#47 Yashied

Yashied

    Happy in Moscow

  • MVPs
  • 2,574 posts

Posted 28 October 2009 - 08:15 AM

The library has been updated to version 1.7, see post #1 for more information.

Edited by Yashied, 07 November 2009 - 12:49 AM.


#48 Yashied

Yashied

    Happy in Moscow

  • MVPs
  • 2,574 posts

Posted 02 November 2009 - 09:00 AM

The library has been updated to version 1.8, see post #1 for more information.

Edited by Yashied, 07 November 2009 - 12:49 AM.


#49 UTA

UTA

    Wayfarer

  • Active Members
  • Pip
  • 51 posts

Posted 03 January 2010 - 12:05 AM

Excellent work and searched very often in the past. Now any search is over.

But while playing around a bit and recognizing the huge quality-difference between GUICtrlCreateIcon and your _SetIcon-Function:
What are the reasons that the _SetIcon-Function is able to resize the icon to a specified size BUT _SetHIcon is NOT ?

I guess it's not possible to resize it with the _SetHIcon-Function (because you sure have thought about that) but its hard to believe... ?!
And damn, I'm not able to prove otherwise. ;)

UTA

#50 UTA

UTA

    Wayfarer

  • Active Members
  • Pip
  • 51 posts

Posted 03 January 2010 - 12:03 PM

OK, but this is my argumentation:

I used the inbuilt internal function to convert icons to bitmaps, resize bitmaps and convert bitmaps to icons again.
The new code of your _SetHIcon-function is the following:
AutoIt         
Func _SetHIcon($hWnd, $hIcon, $iWidth = -1, $iHeight = -1, $hOverlap = 0)     Local $hBitmap     $hWnd = _Icons_Control_CheckHandle($hWnd)     If $hWnd = 0 Then         Return SetError(1, 0, 0)     EndIf     _Icons_Control_CheckSize($hWnd, $iWidth, $iHeight)     If Not ($hOverlap < 0) Then         $hOverlap = _Icons_Control_CheckHandle($hOverlap)     EndIf     $hBitmap=_Icons_Bitmap_CreateFromIcon($hIcon)     $hBitmap=_Icons_Bitmap_Resize($hBitmap, $iWidth, $iHeight)     $hIcon = _Icons_Icon_CreateFromBitmap($hBitmap)     If $hBitmap Then         _WinAPI_DeleteObject($hBitmap)     EndIf     If Not _Icons_Control_SetImage($hWnd, $hIcon, $IMAGE_ICON, $hOverlap) Then         If $hIcon Then             _WinAPI_DestroyIcon($hIcon)         EndIf         Return SetError(1, 0, 0)     EndIf     Return 1 #cs     ;Original Code of this function:     $hWnd = _Icons_Control_CheckHandle($hWnd)     If $hWnd = 0 Then         Return SetError(1, 0, 0)     EndIf     If Not ($hOverlap < 0) Then         $hOverlap = _Icons_Control_CheckHandle($hOverlap)     EndIf     $hIcon = _Icons_Icon_Duplicate($hIcon)     If Not _Icons_Control_SetImage($hWnd, $hIcon, $IMAGE_ICON, $hOverlap) Then         If $hIcon Then             _WinAPI_DestroyIcon($hIcon)         EndIf         Return SetError(1, 0, 0)     EndIf     Return 1 #ce EndFunc   ;==>_SetHIcon


It's not quite a stretch, I know. And it's absolutely not that smooth as it is with _SetIcon (compared the quality is worse) but it's working. And at the moment I wouldn't want to miss the possibility to work the same way _SetIcon does (resize it, if necessary), if there is no need to. But maybe there is a better/smoother idea of the "how to resize" somewhere?

Does anybody of you have such an idea?

UTA

Edited by UTA, 03 January 2010 - 12:04 PM.


#51 Onylove

Onylove

    Seeker

  • Active Members
  • 14 posts

Posted 10 January 2010 - 12:59 PM

When I Obfuscated the script by this udf, It isn't worked and have a problem:

-### Obfuscation Error: Found Eval() statement using unsolvable Func, which will/could lead to problems running your obfuscated script.
>### current Func: __GUICtrl_SetOnHover_Call_Proc
C:\Users\Le Quoc Nam\Desktop\vtc\Icons_Hover\UDFs\GUICtrlSetOnHover.au3(371,1) Warning for line:$sEval = Eval("sParam" & $i-1)

-###2 Obfuscation Error: Found Execute() statement which will lead to problems running your obfuscated script.
>### current Func: __GUICtrl_SetOnHover_Call_Proc
C:\Users\Le Quoc Nam\Desktop\vtc\Icons_Hover\UDFs\GUICtrlSetOnHover.au3(383,1) Warning for line:Local $iRet = Execute($sCall_Params)

-###2 Obfuscation Error: Found Execute() statement which will lead to problems running your obfuscated script.
>### current Func: __GUICtrl_SetOnHover_Call_Proc
C:\Users\Le Quoc Nam\Desktop\vtc\Icons_Hover\UDFs\GUICtrlSetOnHover.au3(390,1) Warning for line:$iRet = Execute($sCall_Params)

-### Obfuscation Error: Found Call() statement using unsolvable Func, which will/could lead to problems running your obfuscated script.
>### current Func: __GUICtrl_SetOnHover_OnAutoItExit
C:\Users\Le Quoc Nam\Desktop\vtc\Icons_Hover\UDFs\GUICtrlSetOnHover.au3(412,1) Warning for line:Call($__GUICtrl_SetOnHover_sOriginal_OnExitFunc)

-#############################################################################################
-#### Obfuscator Found 4 Error(s)!!!! This means your script could have problems running properly. ####
-#############################################################################################
+> Obfuscator v1.0.26.13 finished obfuscating 6791 lines, stripped 12039 comment lines. created:C:\Users\Le Quoc Nam\Desktop\vtc\Icons_Hover\Demo_Obfuscated.au3

Please tell me the way tho correct it. Thanks all. ;)
Forever (freeze_love)Blog at: http://freeze_love.summerhost.info/

#52 Yashied

Yashied

    Happy in Moscow

  • MVPs
  • 2,574 posts

Posted 10 January 2010 - 03:14 PM

When I Obfuscated the script by this udf, It isn't worked and have a problem:

Please tell me the way tho correct it. Thanks all. ;)

Ask here.

#53 Onylove

Onylove

    Seeker

  • Active Members
  • 14 posts

Posted 10 January 2010 - 04:13 PM

I'm sorry, I was a mistakenly. :-s
Forever (freeze_love)Blog at: http://freeze_love.summerhost.info/

#54 shEiD

shEiD

    Wayfarer

  • Active Members
  • Pip
  • 77 posts

Posted 26 March 2010 - 10:12 PM

Hi,
Tried running Demo.au3 from Icons_Hover.zip. I get this error:
D:\Icons UDF\UDFs\GUICtrlSetOnHover.au3(15,107) : ERROR: Opt() called with illegal argument 1: "OnExitFunc"
Global $__GUICtrl_SetOnHover_sOriginal_OnExitFunc = Opt("OnExitFunc", "__GUICtrl_SetOnHover_OnAutoItExit")

#55 Yashied

Yashied

    Happy in Moscow

  • MVPs
  • 2,574 posts

Posted 27 March 2010 - 02:06 AM

Hi,
Tried running Demo.au3 from Icons_Hover.zip. I get this error:
D:\Icons UDF\UDFs\GUICtrlSetOnHover.au3(15,107) : ERROR: Opt() called with illegal argument 1: "OnExitFunc"
Global $__GUICtrl_SetOnHover_sOriginal_OnExitFunc = Opt("OnExitFunc", "__GUICtrl_SetOnHover_OnAutoItExit")

This is MrCreatoR's GUICtrlSetOnHover UDF. Try to download the latest version.

#56 oren

oren

    Adventurer

  • Active Members
  • PipPip
  • 145 posts

Posted 18 November 2010 - 06:36 PM

I've found a error in the package..
I've made a post But I think posting it as well can be related
Hello ,
I have a gui problem.. I don't know if its the right sub-forum to post But because its not that I have a question how to do something its just that the something go bad I decided to post in here.

Anyway a few examples:
Before Minimize it look good like this
Posted Image



After minimize and then restore from task-bar it look like this
Posted Image



Any reason why? and How can I fix it?

For the background I use
 GUICtrlCreatePic ( "BackPic.jpg", 1, 1,800,600)  GuiCtrlSetState(-1,$GUI_DISABLE)  GUISetState(@sw_show)



and for the pieces I use (Example..)
$Board[1][$s][0] = guictrlcreatepic("",720,30+40*$s) $hGreen1  = _Icons_Bitmap_Load(@ScriptDir & "\white.png") _SetHImage($Board[1][$s][0],$hGreen1 ) GuiCtrlSetState(-1,$GUI_DISABLE)



I've added a example Just download all the file and extract to the same dir and run ForumTest minimize and restore from desk-top and you'll see

Attached Files



#57 Yashied

Yashied

    Happy in Moscow

  • MVPs
  • 2,574 posts

Posted 19 November 2010 - 03:09 AM

Specify the image dimensions in an explicit form.

GUICtrlCreatePic("", 720, 30 + 40 * $s, 41, 40)


#58 oren

oren

    Adventurer

  • Active Members
  • PipPip
  • 145 posts

Posted 19 November 2010 - 09:34 PM

Thanks man it work.

#59 martin

martin

    ~~\o/~~~/0\=¬''~~~

  • MVPs
  • 7,313 posts

Posted 27 May 2011 - 12:05 PM

Yashied, the download links are not working today.
Is there an update to allow for the change in the images supplied with the latest AutoIt, or have I lost some images?
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

#60 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,170 posts

Posted 28 May 2011 - 07:17 AM

Just checked the links and they seem to working again.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 30/07/2014





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users