- Offizieller Beitrag
Gibt es eigentlich in allen Windowsversionen die shell32.dll?
Und sind die Icons, die man daraus benutzen/anzeigen kann, bei allen Versionen gleich?
Hab jetzt leider keine Möglichkeit das zu testen.
Gibt es eigentlich in allen Windowsversionen die shell32.dll?
Und sind die Icons, die man daraus benutzen/anzeigen kann, bei allen Versionen gleich?
Hab jetzt leider keine Möglichkeit das zu testen.
Die shell32.dll gibt es seit Windoof 98 ...
Die Iconnummern in der Shell sind auf jeden Fall abwärtskompatibel.
http://msdn2.microsoft.com/en-us/library/…28VS.85%29.aspx
Gruß
Greenhorn
Es gibt sie also. Aber die Icons selbst sehen vermutlich anders aus, oder?
Ich werd einfach alle benötigten extrahieren und extra speichern.
Trotzdem Danke für den Link.
Hi,
ja würde ich auch mal vermuten. Du kannst aber auch ganze IconPacks runterladen dann hast du viel mehr und schönere als nur die der shell
Mega
Die Icons aus der shell32 sollte man dann nehmen, wenn die Icons gleich wie im übrigen Windows aussehen sollen :). Wenn das nicht wichtig ist, sind eigene Iconpacks sicher die bessere Wahl.
Hattest du nicht auch mal dies gemacht?
#include<GUIConstants.au3>
;===============================================================================
;
; Description: Show all icons in the given file and choose one.
; Requirement(s): Autoit 3.2.5+
; Author(s): Prog@ndy (some Functions and Gui-Style by YDY (Lazycat) (in enumicons_v2))
; Version: 1.0
; Date: 02.11.2007
;
; How to Call: $ret = _ChooseIcon( [Optional: Filename] )
; Return Values: Array:
; [0] = FileName
; [1] = Icon Number
;
;===============================================================================
Global $_CI_StartIndex, $_CI_IconCount, $_CI_FileName, $_CI_SelectedIconName
Global $_CI_hFileSel, $_CI_hGui, $_CI_hFile, $_CI_Next, $_CI_Back, $_CI_OK, $_CI_Icon, $_CI_hStatus, $_CI_IconRadios[30], $_CI_Labels[30] ;Gui-Variables
$_CI_StartIndex = 1
Global $_CI_oldEventMode
#cs Example
$ret = _ChooseIcon()
MsgBox(0,"Icon","Pfad: " & $ret[0] & @CRLF & "icon-Nr.: " & $ret[1])
#ce
$ret = _ChooseIcon()
MsgBox(0,"Icon","Pfad: " & $ret[0] & @CRLF & "icon-Nr.: " & $ret[1])
Func _ChooseIcon($fFileName = "")
[/autoit] [autoit][/autoit] [autoit]$_CI_oldEventMode = Opt("GuiOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]If FileExists($fFileName) Then
$_CI_FileName = $fFileName
Else
$_CI_FileName = @SystemDir & "\shell32.dll"
EndIf
$_CI_hGui = GUICreate("Icon Selector by Ordinal value", 385, 450, -1, -1, -1, $WS_EX_ACCEPTFILES)
GUISetOnEvent($GUI_EVENT_CLOSE, "_CI_CloseFunc")
GUICtrlCreateGroup("", 5, 1, 375, 40)
GUICtrlCreateGroup("", 5, 50, 375, 350)
$_CI_hFile = GUICtrlCreateInput($_CI_FileName, 12, 15, 325, 16, -1, $WS_EX_STATICEDGE)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
GUICtrlSetTip(-1, "You can drop files from shell here...")
$_CI_hStatus = GUICtrlCreateInput("", 90, 49, 200, 16, $ES_READONLY, $WS_EX_STATICEDGE)
$_CI_hFileSel = GUICtrlCreateButton("...", 345, 14, 26, 18)
GUICtrlSetOnEvent(-1, "_CI_LoadButton")
$_CI_Next = GUICtrlCreateButton("&Weiter -|>", 310, 410)
GUICtrlSetOnEvent(-1, "_CI_Next")
$_CI_Back = GUICtrlCreateButton("<|- &Zurück", 20, 410)
GUICtrlSetOnEvent(-1, "_CI_Back")
$_CI_OK = GUICtrlCreateButton("Icon wählen:", 120, 410)
GUICtrlSetOnEvent(-1, "_CI_CloseFunc")
GUICtrlSetState(-1, $GUI_DISABLE)
$_CI_Icon = GUICtrlCreateIcon("", 0, 190, 404, 32, 32)
For $iCntRow = 0 To 4
For $iCntCol = 0 To 5
$iCurIndex = $iCntRow * 6 + $iCntCol
$_CI_IconRadios[$iCurIndex] = GUICtrlCreateRadio("", 55 * $iCntCol + 25, 65 * $iCntRow + 75, 45, 45, $BS_ICON + $BS_PUSHLIKE)
GUICtrlSetImage(-1, @SystemDir & "\shell32.dll", -2)
;$ahIcons[$iCurIndex] = GUICtrlCreateIcon($glFilename, 0, 60 * $iCntCol + 25, 70 * $iCntRow + 80)
GUICtrlSetOnEvent(-1, "_CI_SelectedIcon")
$_CI_Labels[$iCurIndex] = GUICtrlCreateLabel("1", 55 * $iCntCol + 12, 65 * $iCntRow + 120, 58, 20, $SS_CENTER)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
Next
Next
_CI_NewFileLoad($_CI_FileName)
GUISetState() ; will display an dialog box with 1 checkbox
; Run the GUI until the dialog is closed
While WinExists($_CI_hGui)
Sleep(100)
WEnd
Local $arTemp[2] = [$_CI_FileName, $_CI_SelectedIconName]
Return $arTemp
EndFunc ;==>_ChooseIcon
Func _CI_Next()
If $_CI_StartIndex + 30 <= $_CI_IconCount Then $_CI_StartIndex += 30
If $_CI_StartIndex + 30 > $_CI_IconCount Then
GUICtrlSetState($_CI_Next, $GUI_DISABLE)
EndIf
GUICtrlSetState($_CI_Back, $GUI_ENABLE)
_CI_Update()
EndFunc ;==>_CI_Next
Func _CI_Back()
If $_CI_StartIndex - 30 >= 0 Then $_CI_StartIndex -= 30
If $_CI_StartIndex - 30 < 0 Then
GUICtrlSetState($_CI_Back, $GUI_DISABLE)
EndIf
GUICtrlSetState($_CI_Next, $GUI_ENABLE)
_CI_Update()
EndFunc ;==>_CI_Back
Func _CI_Update()
For $iCntRow = 0 To 4
For $iCntCol = 0 To 5
$iCurIndex = $iCntRow * 6 + $iCntCol
If ($iCurIndex + $_CI_StartIndex) > $_CI_IconCount Then
GUICtrlSetState($_CI_IconRadios[$iCurIndex], $GUI_HIDE)
GUICtrlSetState($_CI_Labels[$iCurIndex], $GUI_HIDE)
Else
GUICtrlSetState($_CI_IconRadios[$iCurIndex], $GUI_SHOW)
GUICtrlSetState($_CI_Labels[$iCurIndex], $GUI_SHOW)
GUICtrlSetState($_CI_IconRadios[$iCurIndex], $GUI_UNCHECKED)
GUICtrlSetImage($_CI_IconRadios[$iCurIndex], $_CI_FileName, -($_CI_StartIndex + $iCurIndex))
GUICtrlSetData($_CI_Labels[$iCurIndex], -($_CI_StartIndex + $iCurIndex))
If - ($_CI_StartIndex + $iCurIndex) = $_CI_SelectedIconName Then GUICtrlSetState($_CI_IconRadios[$iCurIndex], $GUI_CHECKED)
EndIf
Next
Next
GUICtrlSetData($_CI_hStatus, "Icons " & $_CI_StartIndex & "-" & _CI_MyMin(($_CI_StartIndex + 29), $_CI_IconCount) & " von " & $_CI_IconCount & " | Seite " & Ceiling(($_CI_StartIndex) / 30) & "von " & Ceiling($_CI_IconCount / 30))
EndFunc ;==>_CI_Update
Func _CI_CloseFunc()
GUIDelete($_CI_hGui)
Opt("GuiOnEventMode", $_CI_oldEventMode)
EndFunc ;==>_CI_CloseFunc
Func _CI_SelectedIcon()
For $i = 0 To 29
If $_CI_IconRadios[$i] = @GUI_CtrlId Then
$_CI_SelectedIconName = 1 * GUICtrlRead($_CI_Labels[$i])
GUICtrlSetImage($_CI_Icon, $_CI_FileName, $_CI_SelectedIconName)
GUICtrlSetState($_CI_OK, $GUI_ENABLE)
ExitLoop
EndIf
Next
EndFunc ;==>_CI_SelectedIcon
Func _CI_LoadButton()
Return _CI_NewFileLoad(FileOpenDialog("Select Icon file:", GUICtrlRead($_CI_hFile), "Icon-Files (*.exe;*.dll;*.ocx;*.icl;*.ico)"))
EndFunc ;==>_CI_LoadButton
Func _CI_NewFileLoad($sTmpFile)
If Not FileExists($sTmpFile) Then Return 0
If @error Then Return 0
$glFileName = $sTmpFile
GUICtrlSetData($_CI_hFile, $glFileName)
$_CI_iStartIndex = 1
$_CI_IconCount = _GetIconCount($sTmpFile)
For $i = 0 To 29
GUICtrlSetImage($_CI_IconRadios[$i], $_CI_FileName, -($i + $_CI_iStartIndex))
GUICtrlSetState($_CI_IconRadios[$i], $GUI_UNCHECKED)
GUICtrlSetData($_CI_Labels[$i], -($i + $_CI_iStartIndex))
Next
GUICtrlSetData($_CI_hStatus, "Icons 1 - 30 von " & $_CI_IconCount & " | Seite 1 von " & Ceiling($_CI_IconCount / 30))
;Return 1
GUICtrlSetState($_CI_Back, $GUI_DISABLE)
GUICtrlSetState($_CI_OK, $GUI_DISABLE)
_CI_Update()
EndFunc ;==>_CI_NewFileLoad
; Function by YDY (Lazycat)
Func _GetIconCount($sFilename)
Local $iCount = DllCall("Shell32", "int", "ExtractIconEx", "str", $sFilename, "int", -1, "ptr", 0, "ptr", 0, "int", 1)
If Not @error Then Return $iCount[0]
Return 0
EndFunc ;==>_GetIconCount
Func _CI_MyMin($1, $2)
If Number($1) < Number($2) Then
Return Number($1)
Else
Return Number($2)
EndIf
EndFunc ;==>_CI_MyMin
Mega
Ja, das hatte ich mal gemacht.
Icon Auswählen-Dialog da gibt es auch eine Version im Schleifenmodus ohne GUIEventMode
Um eigene Icon Dlls zu erstellen eignet sich zum Beispiel GConvert. Damit lassen sich auch Bilder in Icons konvertieren
Hallo
Falls du den Total Commander benutzt (*schwärm*^^), dann gibt das Plugin "IclView" auf der Pluginseite für den Lister.
Damit kannst du aus *.ico, *.exe, *.dll, *.icl,... Dateien, Icons dir angucken, und ggf auch direkt als Icon extrahieren, oder als icl Datei (die du Natürlich selbst definieren kannst) speichern.
Mfg Spider
Hi Oscar,
Icons in shell32.dll ist eigentlich schon geläufig, sicher kennst Du auch die „Progman.exe“ in Windows. Sie führt ebenso viele Icons mit sich. Alles Andere wurde schon gesagt.
Schönes WE und weiterhin
viel Erfolg !
Um eigene Icon Dlls zu erstellen eignet sich zum Beispiel GConvert. Damit lassen sich auch Bilder in Icons konvertieren
Jo - und ganz wichtig: mit GConvert kann man eigene icon librarys auf windows vista taugliche 32 bit librarys konvertieren, falls vista sich weigert die selbergebastelten anzuzeigen!
@Xeno: Ja, ich habe jetzt die Icons aus einem Iconpack. Etwas nachbearbeitet. Danke, für den Tip.
@progandy: Dein Script habe ich und benutze es auch. Sehr Hilfreich!
GtaSpider : Der TotalCommander ist mein absolutes Lieblingsprogramm. Läuft immer im Hintergrund. IclView kannte ich aber noch nicht. Danke!
@Ritzelrocker: Die Icons aus der 'Progman.exe' sind irgendwie nicht so der Brüller. Etwas....veraltet...
eukalyptus: Igitt! Vista! Bäh!
Zum umwandeln eines Bilds in ein Icon kann man auch IrfanView benutzen. Mache ich immer so.
Hallo,
einer der besten Freeware Icon-Editoren die ich kenne ist IcoFX.
Jo, da stimme ich Dir voll und ganz zu. Völlig genial! Danke für den Tip!