Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using mapinfo 10 and I have created dll with Pelles C with 16*16 and 24*24 bmp images. I placed the dll file into folder containing .mbx file but I get error :

Unableable to locate external icon resource.

Am I missing something.


Create ButtonPad "mybuttonpad"  As
        ID 1001
        Icon 8001 File "icon.dll"
          Calling vendor_ButtonAction
          HelpMsg "ICONTEST"
share|improve this question
up vote 2 down vote accepted

Two things to try:

1. Add the full path to your icon.dll. I normally create a constant aóutside the main procedure and refer to this for all my buttons:

Define FILE_ICONS_DLL  ApplicationDirectory$() & "Icons.dll"

Sub Main
   Create ButtonPad "mybuttonpad"  As
        ID 1001
        Icon 8001 File FILE_ICONS_DLL
          Calling vendor_ButtonAction
          HelpMsg "ICONTEST"

2. If that doesn't fix it, try to use lower numbers for you icons, for instance 1 (and 2). Also I assume that you added the small icons as no 8001 and the larger as no 8002. Right?

share|improve this answer
thanks for help but it now says could not convert data what might be the problem – kinkajou Aug 26 '11 at 8:46
convert the data? Can you be a bit more precise on the error message – Peter Horsbøll Møller Aug 26 '11 at 9:26
When I add the code for DLL file it generates error "Cannot convert data" That's all.Is it problem with dll creating I have smaller icon with lower number. – kinkajou Aug 26 '11 at 9:51
Could you try with a different dll to see if it is the dll that is the problem. You can find some here: – Peter Horsbøll Møller Aug 26 '11 at 10:11
Actually a "+" in place of "&" in Define FILE_ICONS_DLL ApplicationDirectory$() & "Icons.dll" solved problem. – kinkajou Aug 26 '11 at 10:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.