VERIFIED SOLUTION i

Resolve Set Window Min - Max MapBasic command being ignored in 12.5.2 (32bit) and crashing 12.5.3 (64bit)

Products affected: MapInfo Professional® v12.5.2 and v12.5.3

Issue

Using the MapBasic command Set Window with Min - Max values are ignored in MapInfo Professional® v12.5.2 (32bit) and crashes MapInfo Professional® v12.5.3 (64bit).
 

Cause

This appears to have been introduced when making minimized windows hidden. It does not happen in 12.5.1 (before this change).

These have been logged as bugs MIPRO-60728 MapInfo Professional 64bit and MIPRO-60729 for MapInfo Professional 32bit.

Resolution

UPDATED: August 17, 2017
This issue has been resolve in MapInfo Pro™ v15.2, and so users are encouraged to upgrade to this release to resolve.

The following workarounds can be used for older versions:
 
1. You can manipulate the height, width and position to find a size that works for your application/needs. Please see attached script <FauxMinMax.mb>.
 
include "mapbasic.def"

Dim origHeight, origWidth, origX, origY as float

origWidth =  windowinfo(WIN_MAPINFO , WIN_INFO_WIDTH)
origHeight = windowinfo(WIN_MAPINFO,WIN_INFO_HEIGHT)
origX = windowinfo(WIN_MAPINFO, WIN_INFO_X)
origY = windowinfo(WIN_MAPINFO, WIN_INFO_Y)
note "Faux Min"
set window WIN_MAPINFO width origWidth/10 height origHeight/10 position (WIN_INFO_X/10, WIN_INFO_Y)
note "Faux Max"

set window WIN_MAPINFO width origWidth height origHeight position (origX,origY)
 
 

2. Since this is the application window, you could try issuing a Windows command (not a MapBasic command) to minimize. You would need to obtain the correct window identifier for Windows, using WindowInfo(WIN_INFO_WND).

3. You could hide MapInfo Professional. The only difference between showing and hiding the window is that with HIDE, the user will not see a minimized MapInfo Professional icon in the Windows Taskbar. Please see attached script <HideShow.mb>.
 

include "mapbasic.def"

note "We are going to hide the Pro window"

set window WIN_MAPINFO hide
Note "Now the Pro window is hidden until the user complete's some action, then we will 'SHOW' it again"
set window WIN_MAPINFO show