Hi list !!

Remember, I asked to the list how to setup the Printer orientation of
MapInfo 5.0 with a VB application without user interaction.

Thanks for all the answers.

The solution is to call the MapInfo Printer Configuration DialogBox, and to
simulate a user action with the Windows API.

Step 1 : Create an .exe which look for the MapInfo Printer Configuration
DialogBox and send it the ENTER key (the default button is the OK button).
(See source in attachement.)

 <<ConfigDaemon.cpp>> 
Step 2 : In the VB application.
        1- Setup the MapInfo Printer Configuration DialogBox using the ALTER
MAPINFODIALOG command to set the orientation radio button.
        alter mapinfodialog 1742 control 1056 value 1 ' For Portrait
        alter mapinfodialog 1742 control 1057 value 1 ' For Landscape
        2- Launch the .exe
        3- call Mapbasic command "Run Menu Command 111"

ConfigDaemon.cpp

Reply via email to