Forms Tutorial_Resources and SysImageResources

June 28, 2010 at 19:10
filed under Dynamics AX
Tagged ,

On multiple occasions, you can add an icon to an object. Like for example on menus. You can add an image by setting the NormalImage property to a path, or you can use the NormalResource property.

The only problem with the NormalResource property is that it asks for an integer. But how do you know what integer the icon has that you want to use?

You can use this form:

Depending on what AX version you are using, the name of the form is different:
Dynamics AX 4: form Tutorial_Resources
Dynamics AX 2009: form SysImageResources

For some reason, Microsoft changed the name of that form in AX 2009, and because I started working with AX version 4.0, I always forget the name of that new form :-).

Update: in AX 2009, you can also open this form in the AX menu; click Tools – Development Tools – Embedded resources.

3 comments

RSS / trackback

  1. Ricardo Pichler

    Hi!
    Did you tried to insert your own image into resource and then use? I would like to use my images without need to deploy the image on each machine.

    []s

  2. Klaas Deforche

    Hi Ricardo,

    I haven’t tried that yet, but I don’t think you can do it like you normally would, based on this thread:
    http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.axapta.programming&tid=6cf27bd7-dd39-4de3-88f2-ff85eba713e4&cat=&lang=&cr=&sloc=&p=1

    Maybe you can use the NormalImage property. When you use a windows share to put you icon on, you don’t have to deploy it on every client.

    Or, if you put an image in the client/bin/share/include folder, you can just set the NormalImage to “yourimage.png”.
    There is an include folder on the server to, maybe there is a way to get these to sync (eg using the SysFileDeploymentFile class?).

    You could also store your image in a resource, and when the AX client starts, check if your image exists in the include folder on the client, and if it doesn’t, extract it there.
    I’m just brainstorming here :-).

    I might dig into this a little deeper, and let you know.

  3. Daniel

    Hola Ricardo!

    You can take a look in the last version of Tabax (look for it in Axaptapedia.com). There, in the loadImage() method you have a good example to get images from resources nodes.

    I hope that can help you.

    Greetings!

respond