Board index » delphi » Getting icons of all forms in the project without opening them

Getting icons of all forms in the project without opening them

Hi... I am writing a menu for my application (it has hundreds of
forms).
The menu itself is a treeview, having forms in the leaf nodes.
Each form is registered with RegisterClass. The menu component knows
for each node the classname of the form to be opened.
What I want to do is to have the menu show, for each node, the icon of
the form that will be opened.

Is it possible for example to load each icon from the resources linked
into the executable?

Of course I cant allocate an instance of each form only to retrive its
icon...

Thanks!

Carlo Sirna

 

Re:Getting icons of all forms in the project without opening them


Quote
In article <3bdfe282_1@dnews>, Carlo Sirna wrote:
> Is it possible for example to load each icon from the resources linked
> into the executable?

Not from the form resource, at least not with a lot of hacking. It would
be easier to store the icons as normal icon resources instead of loading
them into the forms Icon property at design-time. The form can then load
them at runtime from the resource and the treeview can build an
imagelist form the icon resources as well.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!
Note: I'm unable to visit the newsgroups every day at the moment,
so be patient if you don't get a reply immediately.

Other Threads