| Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате |
| Форум программистов > VB6 > Как установить иконку исполняемого файла |
| Автор: Akina 3.2.2005, 18:21 | ||
| Икона задается в свойствах проекта... и берется икона одной из форм. А что делать, если форм нет? Просто
Пока что поиск ничего вразумительного не дал... продолжаю искать, но мож кто знает? |
| Автор: srd 3.2.2005, 18:25 |
| Windows в качестве иконки для исполнимого файла использует иконку с наименьшим идентификатором, которую может найти в ресурсах этого файла. Просто добавь в проект RES-файл с одной иконкой, она и будет использована. |
| Автор: boevik 3.2.2005, 18:49 |
| Глупо конечно, но ... добавь форму в проект и установи параметры как надо. |
| Автор: Akina 3.2.2005, 18:56 | ||
| srd Хрен там... это я первым делом попробовал... Добавлено @ 18:56
Это неукоснительное требование - никаких форм. |
| Автор: boevik 3.2.2005, 18:59 | ||
Требование кого? Форму то откомпилированном файле не увидят. |
| Автор: cardinal 4.2.2005, 02:18 | ||
Q. Icons for Form-Less Applications How can I assign the icon of a VB executable without including a form in my project? A. Windows normally uses the lowest-numbered icon resource in your EXE for this purpose. But, no matter how you define your resource file, VB always assigns the ugly default form icon as number 1 if you don't assign a different one in the Project Properties dialog. However, making this assignment is somewhat of a problem if you have no forms in the application. The cheap way out is to include an empty form whose only purpose is to supply an icon. If you try to work around VB's lame insistence on including the default icon by assigning a resource-based icon an ID of 1, VB won't even include your icon in the compiled project. The best method is to assign a string ID to an icon in your application's resource file, because Windows sorts these lower than strictly numeric IDs. To ensure it sorts to the head of the list, you might want to use a string such as "AAA" for the icon ID. Karl E. Peterson is a GIS analyst with a regional transportation planning agency and serves as a member of the Visual Basic Programmer's Journal Technical Review and Editorial Advisory Boards. Online, he's a Microsoft MVP and a section leader on several VBPJ forums. Find more of Karl's VB samples at www.mvps.org/vb. http://vb.mvps.org/articles/ap200006.htm ...может выделенные мной строки помогут |
| Автор: Akina 4.2.2005, 09:38 |
| cardinal ЙЕС! Я знал что все должно быть элементарно... |