ikoner til MapBasic
Jeg vil gerne lave nogle ikoner til brug i MapBasic. Det kan gøres efter denne opskrift fra nettet:1. Create one or more pairs of small bitmaps for use as button faces. The smaller icon in each pair should be 18 pixels wide by 16 high, and the larger one should be 26 pixels wide by 24 high.
2. Open Visual Basic 6.0 and create a new project of type "ActiveX DLL".
3. Choose Add-Ins>Add-In Manager, scroll to choose "VB 6 Resource Editor" and click the "Loaded/Unloaded" and "Load On Startup" checkboxes. Click OK.
4. Choose Tools>Resource Editor.
5. In the Resource Editor window, click on the button with a "bitmap" icon -- picture of landscape with cactus -- and browse to find the first (smaller) bitmap of a pair. Click OK to add the bitmap to the resource file. Repeat this step with the larger icon. By default, the bitmaps will be numbered in succession starting with 01. Double-clicking on an entry in the main Resource Editor window will allow these ID values to be changed, if necessary; however, it is important to be sure that the ID of the larger bitmap in each pair is one more than the ID of the smaller bitmap. In my example below, "small.bmp" was added first, then "large.bmp".
6. Click the 'Save' button (picture of floppy disk) and choose a name and location for the resulting resource file, and save the file.
7. Exit the Resource Editor.
8. Choose File>Make Project1.DLL. Choose a name and location for the resulting DLL file. In my example below, the DLL's name is "MBButton.DLL". If possible, save the DLL file in the same directory as the .MBX application that will be using the custom buttons.
9. Write MapBasic code as shown in the sample below to use the button bitmaps packaged in the DLL file:
Men jeg ved intet om VB så:
1. Hvordan åbner jeg VB og laver et projekt type "ActiveX DLL".
Skal man åbne VB i Excel eller hvad?
2. Jeg har nogle .ico-filer som jeg har downloaded, det er ikke .bmp som der står i opskriften. Gør det forskel på proceduren?