Detecting key states in MapBasic

Posted on Leave a comment

Here’s another neat little MapBasic function I’ve been using recently. I needed a way of detecting whether a key on the keyboard was currently pressed or not. My intention was to show a hidden debugging dialog if a user shift-clicked on a specific button control, but there’s no in-built functions in MapBasic for detecting key […]

Regular expressions in MapBasic

Posted on 3 Comments

I’m going to take a break from all my recent QGIS posts to talk about some MapBasic news… I’m proud to announce the release of MbRegEx, an open-source library for using regular expressions in MapBasic scripts! If you’re not familiar with regular expressions, they’re an extremely powerful tool for string manipulation. They can be somewhat daunting […]

Alpha Shapes for MapInfo

Posted on 3 Comments

One recurring question which pops up on the MapInfo mailing list relates to creating a polygon which encloses a set of objects.  While this can sometimes be achieved with a Convex Hull, the results aren’t always that useful. For example, take a bunch of points in the shape of the letter A: Using the standard Convex […]

Better Dialogs in MapBasic

Posted on Leave a comment

Any easy way to add some extra polish to MapBasic applications is to switch from using the MapBasic Note and Ask commands to standard Windows message boxes. While the Note command is handy for quickly giving feedback to a user, there’s zero options for customising the dialogs. Let’s see what we can do about that. We’ll […]