I haven't tried this, but someone pointed to this when I was trying to create custom tool buttons. http://members.aol.com/maptools/custbtn2.html ------------------- I have attached some instructions sent to me by Thomas Gulden. Between his instructions, VB help and MI & MB help, I was able to create a couple of buttons. Hope this helps Gerald Kornelsen
You just start a new project in Visual Basic and from the Wizard which popped up in my VB 5 choose Active X Document DLL. Visual Basic then arranges the project for you. The main hassle is to create the required resource file (*.rc) which is a kind of container for your bitmap icons. I remember it as a simple ASCII-Text file which you can create and edit with notepad for example. It just contains the required plain text commands to bind your bitmaps into the resource file, which will be compiled (see below). This is the only place where some knowledge of special commands comes in, but all necessary help to do that I could obtain from the MSDN-CD shipped with VB 5 Pro and from the VB online help. Then you have to compile the resource file into a compiled resource file which has a *.res extension. On the VB 5 CD there was a resource compiler included, it was under \Tools\Resource\RC32, the file is Rc.exe. I think there was also a help file for it. Once you have created the *.res file, in VB the only thing you have to do is to choose Add File and specifiy your *.res file. Then the resource file is added to your project. There is no VB coding required (as I can recall) or if, it is very little. Also I remember that for each custom icon you have to bind two bitmaps (one for small one for large icons) into your resource file, the pairs have two consecutive ID numbers. The first number will be the icon ID for your custom button in MapBasic. These icons must be stored locally on each PC that uses them.