Гость
Форумы / WinForms, .Net Framework [игнор отключен] [закрыт для гостей] / associated icon / 3 сообщений из 3, страница 1 из 1
24.04.2003, 18:37
    #32148294
Guest_1
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
associated icon
подскажите плиз чем можно вытащить иконку файла
как это делает SHGetFileInfoA из shell32.dll
...
Рейтинг: 0 / 0
25.04.2003, 09:16
    #32148468
hDrummer
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
associated icon
см. 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
25.04.2003, 10:42
    #32148584
Guest_1
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
associated icon
Спасибо, hDrummer.
Но хотелось бы извлекать из "любых" файлов, а не только .NET
...
Рейтинг: 0 / 0
Форумы / WinForms, .Net Framework [игнор отключен] [закрыт для гостей] / associated icon / 3 сообщений из 3, страница 1 из 1
Целевая тема:
Создать новую тему:
Автор:
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


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