This library contains only one function which displays a dialog box that allows the user to choose an icon from the selection available embedded in a resource such as an executable or DLL file. Of course, there is a PickIconDlg() API function but the dialog box created by this library has the following advantages:
- Ability to resize the displayed icons.
- Ability to resize the dialog box.
- Ability to save the window's settings (size, position, etc.) in the registry.
- Fully customizable appearance a dialog box.
- More pleasing appearance.
If you use in your code one of these messages, you should call handlers from this library until returns from your handlers, otherwise, the dialog box will not work properly, for example:
As usualy, I will be glad to any feedback and suggestions.
IconChooser UDF Library v1.1
Previous downloads: 71
IconChooser.au3 38.44KB 744 downloads
#Include <IconChooser.au3> Global $Ico = [@SystemDir & '\shell32.dll', 23] $hForm = GUICreate('MyGUI', 160, 160) $Button = GUICtrlCreateButton('Change Icon...', 25, 130, 110, 23) $Icon = GUICtrlCreateIcon($Ico, -(1 + $Ico), 64, 50, 32, 32) GUISetState() While 1 Switch GUIGetMsg() Case -3 ExitLoop Case $Button $Data = _IconChooserDialog($Ico, $Ico, 32, -1, $hForm) If IsArray($Data) Then GUICtrlSetImage($Icon, $Data, -(1 + $Data)) $Ico = $Data EndIf EndSwitch WEnd
Edited by Yashied, 10 December 2013 - 02:50 PM.