powered by simpleCommunicator - 2.0.38     © 2025 Programmizd 02
Форумы / WinForms, .Net Framework [игнор отключен] [закрыт для гостей] / associated icon
3 сообщений из 3, страница 1 из 1
associated icon
    #32148294
Guest_1
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
подскажите плиз чем можно вытащить иконку файла
как это делает SHGetFileInfoA из shell32.dll
...
Рейтинг: 0 / 0
associated icon
    #32148468
Фотография hDrummer
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
см. ResourceManager class
...
Now suppose that a ResourceManager has been created to represent the resources with this basename. Using the ResourceManager, you can obtain a ResourceSet that encapsulates "MyResources.ja-JP.resources" by calling GetResourceSet(new CultureInfo ("ja-JP"), TRUE, FALSE). Or, if you know that "MyResources" contains a resource named "TOOLBAR_ICON", you can obtain the value of that resource localized for Japan by calling GetObject("TOOLBAR_ICON", new CultureInfo("ja-JP")).
...
+
There's several methods to work with resouces in .NET Framework:

1. Create a .resource and add icons to the file, and then add the .resource file to your project and set the "Build Action" property to "Embedded Resource". Now, you
can use ResourceManager to retrieve the icons from the assembly.

There are some handy tools you can use to work with .resource and .resx files:

Resourcer for .NET
http://www.aisto.com/roeder/dotnet/

ResEditor in FrameworkSDK (Compile it before using)
FrameworkSDK\Samples\tutorials\resourcesandlocalization\reseditor\ResEditor.exe

2. You can also embed resources to the assembly directly using "Add Existing Item..." menu option. To retrieve these directly embedded resources, you can use
GetManifestResourceStream method to load the specified manifest resource from this assembly and cast the stream to appropriate type.
...
Рейтинг: 0 / 0
associated icon
    #32148584
Guest_1
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Спасибо, hDrummer.
Но хотелось бы извлекать из "любых" файлов, а не только .NET
...
Рейтинг: 0 / 0
3 сообщений из 3, страница 1 из 1
Форумы / WinForms, .Net Framework [игнор отключен] [закрыт для гостей] / associated icon
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]