MapInfo Pro Developers User Group

Expand all | Collapse all

Access the Welcome Window OR Mapbasic Dialog with image

  • 1.  Access the Welcome Window OR Mapbasic Dialog with image

    Posted 8 days ago
    Is it possible to access the Welcome window that we can trigger from the options menu?



    For our users in Mapinfo Workgroup 2019, I would like to include the corporate logo and news that is relevant to the organisation as well as the Precisely information if the html is a local file.

    Is this possible?

    Failing that is there mapbasic that allows us to trigger a window with an image or a local html page? We currently use the following but I can't work out how to include an image in this.

    Dialog
    Title "WELCOME!"
    Control GroupBox
    Title "Select Mapping Application to Activate"
    Width 137
    Control RadioGroup
    Title "& X Shire GIS;& Full MapInfo Application;& MapInfo Interface Manual"
    Value 1
    Into selection
    Control OKButton
    Title "OK"

    If selection = 1 then

    Close Table Splash_Image
    Run Application "M:\System\MapBasic_64bit\x_GIS.mbx"


    End If
    ...


    ------------------------------
    George Corea
    Mangoesmapping
    MOOMIN QLD
    ------------------------------


  • 2.  RE: Access the Welcome Window OR Mapbasic Dialog with image

    Posted 6 days ago
    Based on https://groups.google.com/g/mapinfo-l/c/a1mVMwbrbH0 , I tried a couple of options but none of them do what I need. See comments in code for details on the issues.

    Sub Splash 'based on https://groups.google.com/g/mapinfo-l/c/a1mVMwbrbH0
    Dim iHwnd As Integer
    iHwnd = ReadControlValue(2)

    Set Next Document Parent iHwnd Style WIN_STYLE_CHILD
    Map from Splash_Image
    End Sub

    SUB MAIN

    'Alter ButtonPad "Tools" Destroy
    'Run program "cmd /c start M:\System\MapBasic_64bit\splash\splash.html" 'Opens the html in the browser but then the dialog to choose a version of MI loads separately so it's not practical.

    Open Table "M:\System\Logo\MMLogo 2020-01.TAB" as Splash_Image Interactive
    Map From Splash_Image
    'Max

    Dim map_win_id as integer
    map_win_id = WindowID(0)
    Set window map_win_id title "Custom Mangoesmapping GIS"

    Dim selection as integer
    Close Table Splash_Image

    Open Table "M:\System\Logo\MMLogo 2020-01.TAB" as Splash_Image Interactive
    Map From Splash_Image 'Loads image only if choice dialog is closed.
    'Max

    'Add Map Layer Splash_Image

    Note "Loading Dialog New" 'Unfortunately image doesn't display

    Dialog Title "About" Calling Splash Width 800 Height 600
    Control DocumentWindow ID 2 Position 140, 5 Width 80 Height 40
    Control StaticText title "Author: me" Position 5,10
    Control StaticText title "xxx" Position 5,20
    Control StaticText title "E-Mail: xxxxxx" Position 5,30
    Control OKButton Position 80,43

    Close Table Splash_Image

    Note "Loading Dialog Standard"
    Dialog
    Title "WELCOME!"

    ------------------------------
    George Corea
    Mangoesmapping
    MOOMIN QLD
    ------------------------------