Guidance
指路人
g.yi.org
software / rapidq / Examples / Tools - IDE, Designer, Builder / FreeQ IDE src / inc ide / configuration.inc

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  

     CREATE IDE_Conf_VersionInfoForm AS QFORM
      CAPTION = "VersionInfo Resources"
      Width = 556
      Height = 502
      Center
      CREATE IDE_Conf_ManifestEmbedCheckBox AS QCHECKBOX
       Font.Size = 10
       CAPTION = "Embed Manifest"
       Left = 14
       Top = 8
       Width = 505
       Height = 20
       TabOrder = 1
       Checked = IDE.EmbedManifest
      END CREATE

      CREATE IDE_Conf_VersionInfoCheckBox AS QCHECKBOX
       Font.Size = 10
       CAPTION = "Embed Version Info"
       Left = 14
       Top = 38
       Width = 505
       Height = 20
       TabOrder = 1
       Checked = IDE.EmbedVersionInfo
      END CREATE

      CREATE IDE_Conf_VersionInfoGrid AS QSTRINGGRID
       Left = 13
       Top = 70  '147
       Width = 505
       Height = 330    '257
       fixedrows = 1
       FixedCols = 1
       ColCount = 2
       RowCount = 17
       ColWidths(0) = 170
       ColWidths(1) = 335
       EditorMode = True
       AddOptions(goEditing, goDrawFocusSelected, goTabs, goColSizing, goThumbTracking)
       DefaultRowHeight = 20
       Cell(0,0) = "VersionInfo"
       Cell(1,0) = "Value"
       Cell(0,1) = "FILEVERSION"       : Cell(1,1) = IDE.FileVersion
       Cell(0,2) = "PRODUCTVERSION"    : Cell(1,2) = IDE.ProductVersion
       Cell(0,3) = "FILEOS"            : Cell(1,3) = "0x00010001L"
       Cell(0,4) = "FILETYPE"          : Cell(1,4) = "0x00000001L"
       Cell(0,5) = " "
       Cell(0,6) = "CompanyName"       : Cell(1,6) = IDE.CompanyName
       Cell(0,7) = "Contact e-mail"    : Cell(1,7) = IDE.CompanyEmail
       Cell(0,8) = "FileDescription"   : Cell(1,8) = IDE.FileDescription
       Cell(0,9) = "FileVersion"       : Cell(1,9) = REPLACESUBSTR$(IDE.FileVersion, ",", ".")
       Cell(0,10) = "DevelopmentFile"  : Cell(1,10) = IIF(IDE.MainFileForCompiler <> "", IDE.MainFileForCompiler, IDE.MFEActiveFile)
       Cell(0,11) = "LegalCopyright"   : Cell(1,11) = IDE.LegalCopyright
       Cell(0,12) = ""
       Cell(0,13) = ""
       Cell(0,14) = ""
       Cell(0,15) = ""
      END CREATE


'    CREATE IDE_Conf_VersionInfoRichEdit AS QRICHEDIT
'        Left = 13
'        Top = 147
'        Width = 505
'        Height = 257
'        HideScrollBars = False
'    END CREATE

      CREATE IDE_Conf_VersionInfoOKButton AS QBUTTON
       CAPTION = "OK"
       Left = 443
       Top = 430
       TabOrder = 4
       Default = True
       Cancel = True
       OnClick = IDE_Conf_VersionInfoForm_Close
      END CREATE

     END CREATE


     SUB IDE_Conf_VersionInfoForm_Close
      IDE.EmbedManifest  =         IDE_Conf_ManifestEmbedCheckBox.Checked
      IDE.EmbedVersionInfo  =      IDE_Conf_VersionInfoCheckBox.Checked
      IDE.FileVersion   =          IDE_Conf_VersionInfoGrid.Cell(1,1)
      IDE.ProductVersion   =       IDE_Conf_VersionInfoGrid.Cell(1,2)
      IDE.CompanyName   =          IDE_Conf_VersionInfoGrid.Cell(1,6)
      IDE.CompanyEmail   =         IDE_Conf_VersionInfoGrid.Cell(1,7)
      IDE.FileDescription   =      IDE_Conf_VersionInfoGrid.Cell(1,8)
      IDE.LegalCopyright   =       IDE_Conf_VersionInfoGrid.Cell(1,11)
      IDE_Conf_VersionInfoForm.CLOSE
     END SUB


     SUB IDE_Conf_VersionInfoForm_Show
      IDE_Conf_VersionInfoForm.Left = Screen.MOUSEX
      IDE_Conf_VersionInfoForm.Top = Screen.MOUSEY - 28
      IDE_Conf_VersionInfoForm.Show
     END SUB


'=======================================================================
'    Main configuration / Options form
'=======================================================================
     CREATE IDE_Conf_Form AS QFORM
      CAPTION = "Configuration"
      Width = 666
      Height = 604
      OnShow = IDE_Conf_Form_Refresh

      CREATE IDE_Conf_DefaultButton AS QBUTTON
       CAPTION = "Defaults"
       Left = 24
       Top = 525
       Width = 67
       Height = 33
       TabOrder = 3
       OnClick = IDE_SetDefaultVariables
      END CREATE

      CREATE IDE_Conf_LoadButton AS QBUTTON
       CAPTION = "Load"
       Left = IDE_Conf_DefaultButton.Left + IDE_Conf_DefaultButton.Width + 30
       Top = 525
       Width = 67
       Height = 33
       TabOrder = 2
       Default = True
       OnClick = IDE_Conf_Form_LoadIni
      END CREATE

      CREATE IDE_Conf_OKButton AS QBUTTON
       CAPTION = "Save"
       Left = 473
       Top = 525
       Width = 67
       Height = 33
       TabOrder = 0
       Default = True
       OnClick = IDE_Conf_Form_SaveVars
      END CREATE

      CREATE IDE_Conf_SaveProjButton AS QBUTTON
       CAPTION = "Save As Project"
       Left = 310
       Top = 525
       Width = 128
       Height = 33
       TabOrder = 0
        'Visible = False
       OnClick = MFE_SaveProject
      END CREATE




      CREATE IDE_Conf_CloseButton AS QBUTTON
       CAPTION = "Close"
'        Kind = bkCancel
       Left = 561
       Top = 525
       Width = 67
       Height = 33
       TabOrder = 1
       Cancel = True
       OnClick = IDE_Conf_Form_Close
      END CREATE



      CREATE IDE_Conf_TabControl AS QTABCONTROL
       Top = 0
       Height = 520
       Width = IDE_Conf_Form.ClientWidth
       TabInactiveColor = RGB(225,226,229)
       AddTabs "  Colors / Formating  ", _
        "  Other Options  ", _
        "  Menus / Short Cuts  ", _
        "  Compiler / Paths  ", _
        "  FreeBasic  ", _
        "  External Apps  "
       TabIndex = 0
       OnChange = IDE_Conf_TabChange
      END CREATE

'____________________Panel with Editor / Highlighter options __________________________________________
      CREATE IDE_Conf_EditorGroupBox AS QGROUPBOX
       CAPTION = "Editor / Highlighter"
       Left = 11
       Top = 32
       Width = IDE_Conf_TabControl.Width - 22
       Height = IDE_Conf_TabControl.Height - 48
       TabOrder = 3

       CREATE IDE_Conf_FontButton AS QBUTTON
        CAPTION = "Font ..."
        Left = 255
        Top = 27
        Width = 163
        Height = 24
        TabOrder = 12
        OnClick = IDE_Conf_PickFont
       END CREATE

       CREATE IDE_Conf_FontColorLabel AS QLABEL
        Left = 260
        Top = 64
        Width = 22
        Height = 22
       END CREATE
       CREATE IDE_Conf_FontColorButton AS QBUTTON
        CAPTION = "Font Color"
        Left = 296
        Top = 60
        Width = 122
        TabOrder = 1
        OnClick = IDE_Conf_SelectColor
       END CREATE

       CREATE IDE_Conf_FontBackLabel AS QLABEL
        Left = 260
        Top = 96
        Width = 22
        Height = 22
       END CREATE

       CREATE IDE_Conf_FontBackButton AS QBUTTON
        CAPTION = "Font Background"
        Left = 296
        Top = 94
        Width = 122
        TabOrder = 2
        OnClick = IDE_Conf_SelectColor
       END CREATE

       CREATE IDE_Conf_BoldCheckBox AS QCHECKBOX
        CAPTION = "Bold"
        Left = 262
        Top = 136
        TabOrder = 3
        OnClick = IDE_Conf_RichEdit_Store
       END CREATE
       CREATE IDE_Conf_ItalicCheckBox AS QCHECKBOX
        CAPTION = "Italic"
        Left = 262
        Top = 160
        TabOrder = 4
        OnClick = IDE_Conf_RichEdit_Store
       END CREATE

       CREATE IDE_Conf_UnderLineCheckBox AS QCHECKBOX
        CAPTION = "Underline"
        Left = 262
        Top = 186
        TabOrder = 5
        OnClick = IDE_Conf_RichEdit_Store
       END CREATE


       CREATE IDE_Conf_TabBackLabel AS QLABEL
        Left = 260
        Top = 225
        Width = 22
        Height = 22
       END CREATE

       CREATE IDE_Conf_TabBackButton AS QBUTTON
        CAPTION = "Tab Background"
        Left = 296
        Top = 225
        Width = 122
        TabOrder = 4
        OnClick = IDE_Conf_SelectColor
       END CREATE

       CREATE IDE_Conf_TabInactiveLabel AS QLABEL
        Left = 260
        Top = 259
        Width = 22
        Height = 22
       END CREATE

       CREATE IDE_Conf_TabForeButton AS QBUTTON
        CAPTION = "Tab Inactive"
        Left = 296
        Top = 259
        Width = 122
        TabOrder = 4
        OnClick = IDE_Conf_SelectColor
       END CREATE

       CREATE IDE_Conf_SelForeLabel AS QLABEL
        Left = 260
        Top = 289
        Width = 22
        Height = 22
       END CREATE

       CREATE IDE_Conf_SelForeButton AS QBUTTON
        CAPTION = "Selection Foreground"
        Left = 296
        Top = 290
        Width = 122
        TabOrder = 13
        OnClick = IDE_Conf_SelectColor
       END CREATE

       CREATE IDE_Conf_SelBackLabel AS QLABEL
        Left = 260
        Top = 324
        Width = 22
        Height = 22
       END CREATE

       CREATE IDE_Conf_SelBackButton AS QBUTTON
        CAPTION = "Selection Background"
        Left = 296
        Top = 324
        Width = 122
        TabOrder = 14
        OnClick = IDE_Conf_SelectColor
       END CREATE
       CREATE IDE_Conf_LineNumForeLabel AS QLABEL
        Left = 260
        Top = 360
        Width = 22
        Height = 22
       END CREATE

       CREATE IDE_Conf_LineNumForeButton AS QBUTTON
        CAPTION = "Line Num Foreground"
        Left = 296
        Top = 360
        Width = 122
        TabOrder = 5
        OnClick = IDE_Conf_SelectColor
       END CREATE

       CREATE IDE_Conf_LineNumBackLabel AS QLABEL
        Left = 260
        Top = 393
        Width = 22
        Height = 22
       END CREATE

       CREATE IDE_Conf_LineNumBackButton AS QBUTTON
        CAPTION = "Line Num Background"
        Left = 296
        Top = 393
        Width = 122
        TabOrder = 16
        OnClick = IDE_Conf_SelectColor
       END CREATE

       CREATE IDE_Conf_ActiveLineBackLabel AS QLABEL
        Left = 260
        Top = 426
        Width = 22
        Height = 22
        COLOR = -1
        Visible = NOT!(IDE.ActiveLineBack)
        OnClick = IDE_Conf_ActiveLineSelectColor
       END CREATE


       CREATE IDE_Conf_ActiveLineBackButton AS QCHECKBOX
        CAPTION = "Active Line Highlighting"
        Left = 296
        Top = 426
        Width = 180
        Checked = False
        TabOrder = 17
        OnClick = IDE_Conf_ToggleActiveLineColor
       END CREATE

       CREATE IDE_Conf_TextRichEdit AS QLISTBOX 'QRICHEDIT
        Font = IDE.MainFont
        Left = 19
        Top = 29
        Width = 217
        Height = 160
        AddItems "default", "'Comment", "Number -.1234..", "STRINGS", "$Preprocessor", "Operators <=>/+", "KeyWords", "KeyWords 2", "KeyWords 3"
        ItemIndex = 0
        OnClick = IDE_Conf_Form_Refresh
'            ReadOnly = True
'            AddStrings "default", "'Comment", "Number -.1234..", "STRINGS", "$Preprocessor", "Operators <=>/+", "KeyWords", "KeyWords 2", "KeyWords 3"
'             OnKeyDown = IDE_Conf_TextRichEditKeyDown'(Key AS WORD, Shift AS INTEGER) Key held down 2 WG
'             OnMouseDown = IDE_Conf_TextRichEditMouseDown' (Button%, X%, Y%, Shift%)
       END CREATE

       CREATE IDE_Conf_MainLanguageLabel AS QLABEL
        Left = 19
        Top = 200
        Width = 217
        Font.Size = 12
        CAPTION = "Default Language"
       END CREATE

       CREATE IDE_Conf_MainLanguage AS QCOMBOBOX
        Style = csDropDownList
        Left = 19
        Top = 230
        Width = 140
        Height = 32
        Font.Size = 11
        AddItems("RapidQ                                     8",_
         "FreeBasic                                  75", _
         "Visual Basic                               8", _
         "Blitz Basic                                66", _
         "Pure Basic                                 67", _
         "IBasic                                     30", _
         "Power Basic                                51", _
         "ASM                                        34", _
         "VB Script                                   28", _
         "ASP / PHP                                   4", _
         "python                                      2", _
         "C/C++                                       3", _
         "pascal                                      18", _
         "ruby                                        22", _
         "fortran                                     36", _
         "html                                        4", _
         "perl                                        6", _
         "lua                                         15")

        ItemIndex = 0               'set to first one
        OnChange = IDE_SetLanguage
       END CREATE

       CREATE IDE_Conf_LoadKeywordsButton AS QBUTTON
        CAPTION = "Load Keywords"
        Enabled = False
        Left = 445
        Top = 14
        Width = 166
        TabOrder = 7
       END CREATE

       CREATE IDE_Conf_ListBox AS QLISTBOX
        Font.Size = 10
        Left = 441
        Top = 45
        Width = 174
        Height = 376
        TabOrder = 6
       END CREATE

       CREATE IDE_Conf_Label6 AS QLABEL
        CAPTION = "Spaces"
        Left = 179
        Top = 279
        Width = 36
        Transparent = 1
       END CREATE

       CREATE IDE_Conf_NumSpacesForTabsEdit AS QEDIT
        Text = "4"
        Left = 128
        Top = 275
        Width = 30
        TabOrder = 8
       END CREATE
       CREATE IDE_Conf_UseTabsCheckBox AS QCHECKBOX
        CAPTION = "Use tabs/ else"
        Left = 21
        Top = 276
        Width = 105
        Height = 20
        TabOrder = 9
       END CREATE
       CREATE IDE_Conf_LineNumCheckBox AS QCHECKBOX
        CAPTION = "Line Numbers"
        Left = 21
        Top = 305
        TabOrder = 10
       END CREATE
       CREATE IDE_Conf_AutoIndentCheckBox AS QCHECKBOX
        CAPTION = "Auto Indent"
        Left = 21
        Top = 331
        TabOrder = 10
       END CREATE
       CREATE IDE_Conf_CodeFoldingCheckBox AS QCHECKBOX
        CAPTION = "Code folding"
        Left = 21
        Top = 358
        TabOrder = 11
       END CREATE
       CREATE IDE_Conf_ViewIndentsCheckBox AS QCHECKBOX
        CAPTION = "View Indents"
        Left = 21
        Top = 385
        TabOrder = 15
       END CREATE
       CREATE IDE_Conf_HiLiteCheckBox AS QCHECKBOX
        CAPTION = "Syntax Highlighting"
        Left = 21
        Top = 407
        Width = 240
        TabOrder = 15
       END CREATE
       CREATE IDE_Conf_WordWrapCheckBox AS QCHECKBOX
        CAPTION = "Word Wrap"
        Left = 21
        Top = 429
        Width = 240
        TabOrder = 15
       END CREATE
      END CREATE


'____________________Panel with Rapidq compiler paths and options___________________________________________
      CREATE IDE_Conf_PathsGroupBox AS QGROUPBOX
       Font.Size=11
       CAPTION = "Paths / Compile Options"
       Left = 11
       Top = 32
       Width = IDE_Conf_TabControl.Width - 22
       Height = IDE_Conf_TabControl.Height - 48
       TabOrder = 3
       Visible = False

       CREATE IDE_Conf_LibLabel AS QLABEL
        CAPTION = "Library / DLL location"
        Left = 12
        Top = 77
        Width = 180
        Transparent = 1
       END CREATE
       CREATE IDE_Conf_CompilerLabel AS QLABEL
        CAPTION = "Compiler location"
        Left = 12
        Top = 24
        Width = 180
        Transparent = 1
       END CREATE
       CREATE IDE_Conf_IncFilesLabel AS QLABEL
        CAPTION = "Include Files location"
        Left = 12
        Top = 131
        Width = 180
        Height = 22
        Transparent = 1
       END CREATE
       CREATE IDE_Conf_HelpFileLabel AS QLABEL
        CAPTION = "Help file"
        Left = 16
        Top = 184
        Width = 180
        Height = 22
        Transparent = 1
       END CREATE
       CREATE IDE_Conf_IconDirLabel AS QLABEL
        CAPTION = "Icon directory"
        Left = 16
        Top = 236
        Width = 180
        Height = 22
        Transparent = 1
       END CREATE
       CREATE IDE_Conf_TemplateDirLabel AS QLABEL
        CAPTION = "Template directory"
        Left = 14
        Top = 290
        Width = 180
        Transparent = 1
       END CREATE

       CREATE IDE_Conf_CompilerPathEdit AS QEDIT
        Text = "\Rapidq\rc.exe"
        Left = 12
        Top = 47
        Width = 329
        TabOrder = 3
       END CREATE
       CREATE IDE_Conf_CompilerPathSearchButton AS QBUTTON
        CAPTION = "..."
        Left = 349
        Top = 45
        Width = 36
        Height = 26
        TabOrder = 4
        Tag = 1
        OnClick = IDE_Conf_FindPathTarget
       END CREATE
       CREATE IDE_Conf_HelpFilePathEdit AS QEDIT
        Text = "\Rapidq\Rapidq.chm"
        Left = 12
        Top = 203
        Width = 329
        TabOrder = 5
       END CREATE
       CREATE IDE_Conf_HelpPathSearchButton AS QBUTTON
        CAPTION = "..."
        Left = 349
        Top = 201
        Width = 36
        Height = 26
        TabOrder = 6
        Tag = 6
        OnClick = IDE_Conf_FindPathTarget
       END CREATE
       CREATE IDE_Conf_LibPathEdit AS QEDIT
        Text = "\Rapidq\lib"
        Left = 12
        Top = 98
        Width = 329
        TabOrder = 7
       END CREATE
       CREATE IDE_Conf_LibPathSearchButton AS QBUTTON
        CAPTION = "..."
        Left = 349
        Top = 96
        Width = 36
        Height = 26
        Tag = 2
        OnClick = IDE_Conf_FindPathTarget
       END CREATE
       CREATE IDE_Conf_IconPathSearchButton AS QBUTTON
        CAPTION = "..."
        Left = 349
        Top = 256
        Width = 36
        Height = 26
        TabOrder = 13
        Tag = 4
        OnClick = IDE_Conf_FindPathTarget
       END CREATE
       CREATE IDE_Conf_IconPathEdit AS QEDIT
        Text = "\Rapidq\icon"
        Left = 12
        Top = 258
        Width = 329
        TabOrder = 14
       END CREATE

       CREATE IDE_Conf_IncludePathEdit AS QEDIT
        Text = "\Rapidq\include"
        Left = 12
        Top = 152
        Width = 329
        TabOrder = 5
       END CREATE
       CREATE IDE_Conf_IncludePathSearchButton AS QBUTTON
        CAPTION = "..."
        Left = 349
        Top = 149
        Width = 36
        Height = 26
        TabOrder = 4
        Tag = 3
        OnClick = IDE_Conf_FindPathTarget
       END CREATE

       CREATE IDE_Conf_TemplatesPathEdit AS QEDIT
        Text = "\Rapidq\templates"
        Left = 12
        Top = 313
        Width = 329
        TabOrder = 8
       END CREATE
       CREATE IDE_Conf_TemplatesPathSearchButton AS QBUTTON
        CAPTION = "..."
        Left = 349
        Top = 310
        Width = 36
        Height = 27
        TabOrder = 9
        Tag = 5
        OnClick = IDE_Conf_FindPathTarget
       END CREATE

       CREATE IDE_Conf_OptimizeCheckBox AS QCHECKBOX
        CAPTION = "Default Optimize On "
        Left = 420
        Top = 25
        Width = 177
        TabOrder = 8
       END CREATE
       CREATE IDE_Conf_TypeCheckCheckBox AS QCHECKBOX
        CAPTION = "Default Typecheck On"
        Left = 420
        Top = 50
        Width = 153
        TabOrder = 1
       END CREATE
       CREATE IDE_Conf_VerboseCheckBox AS QCHECKBOX
        CAPTION = "Default Verbose On"
        Left = 420
        Top = 75
        Width = 169
        TabOrder = 2
       END CREATE
       CREATE IDE_Conf_ByteCodeCheckBox AS QCHECKBOX
        CAPTION = "Compile Byte Code"
        Left = 420
        Top = 100
        Width = 169
        TabOrder = 3
       END CREATE
       CREATE IDE_Conf_GenManifestCheckBox AS QCHECKBOX
        CAPTION = "Generate Manifest file"
        Left = 420
        Top = 125
        Width = 150
        TabOrder = 15
       END CREATE

       CREATE IDE_Conf_GenManifestButton AS QBUTTON
        CAPTION = ">"
        Left =IDE_Conf_GenManifestCheckBox.Left + IDE_Conf_GenManifestCheckBox.Width + 8
        Top = IDE_Conf_GenManifestCheckBox.Top
        Width = 28
        Height = IDE_Conf_GenManifestCheckBox.Height
        OnClick = IDE_Conf_VersionInfoForm_Show
       END CREATE

       CREATE IDE_Conf_SaveBeforeCompileCheckBox AS QCHECKBOX
        CAPTION = "Save file before compile"
        Left = 420
        Top = 150
        Width = 180
        TabOrder = 16
       END CREATE

       CREATE IDE_Conf_SaveAllBeforeCompileCheckBox AS QCHECKBOX
        CAPTION = "Save All before compile"
        Left = 420
        Top = 175
        Width = 180
        TabOrder = 17
       END CREATE

       CREATE IDE_Conf_HiLightCompileErr AS QCHECKBOX
        CAPTION = "Goto Compile Error Line"
        Left = 420
        Top = 200
        Width = 180
        TabOrder = 18
       END CREATE

       CREATE IDE_Conf_UseAppDirectory AS QCHECKBOX
        CAPTION = "Set path to application"
        Left = 420
        Top = 225
        Width = 180
        TabOrder = 19
       END CREATE

       CREATE IDE_Conf_ConstDirectoryLabel AS QLABEL
        CAPTION = "Set path to location:"
        Left = 420
        Top = 250
        Width = 180
       END CREATE

       CREATE IDE_Conf_ConstDirectory AS QEDIT
        Text = ""
        Left = 420
        Top = 275
        Width = 180
        ShowHint = True
       END CREATE

       CREATE IDE_Conf_RunScriptLabel AS QLABEL
        CAPTION = "Run this file before compile"
        Left = 420
        Top = 315
        Width = 180
       END CREATE

       CREATE IDE_Conf_RunScriptEdit AS QEDIT
        Text = ""
        Left = 420
        Top = 335
        Width = 180
        Hint = "free parameters:" + CRLF + _
         + CRLF + _
         "%FILE% = FileName of active file" + CRLF + _
         "%FILENAME% = Full path and FileName of active file" + CRLF + _
         "%EXT% = File extension of active file" + CRLF + _
         "%CURRPATH% = Current Path" + CRLF + _
         "%PATH% = Path of active file" + CRLF + _
         "%APPPATH% = Path of FreeQ exe"
        ShowHint = True
       END CREATE

       CREATE IDE_Conf_OpenExtLabel AS QLABEL
        CAPTION = "Open File Filter Mask (File types)"
        Left = 16
        Top = 360
        Width = 230
       END CREATE

       CREATE IDE_Conf_FileExtensionsListBox AS QEDIT
        Left = 16
        Top = 380
        Width = 500
        TabOrder = 9
       END CREATE

       CREATE IDE_Conf_SearchEngLabel AS QLABEL
        CAPTION = "Search Engine"
        Left = 16
        Top = 412
        Width = 180
        Transparent = 1
       END CREATE

       CREATE IDE_Conf_WebSearchEdit AS QEDIT
        Text = "http://www.google.com/search?hl=en&source=hp&q="
        Left = 16
        Top = 431
        Width = 500
        TabOrder = 12
       END CREATE
      END CREATE      'Paths tab



'____________________Panel with Other Options  __________________________________________________

      CREATE IDE_Conf_OtherGroupBox AS QGROUPBOX
       CAPTION = "Other Options"
       Left = 11
       Top = 32
       Width = IDE_Conf_TabControl.Width - 22
       Height = IDE_Conf_TabControl.Height - 48
       TabOrder = 3
       CREATE IDE_Conf_ShowSplashScreen AS QCHECKBOX
        CAPTION = "Show Splash Screen"
        Left = 12
        Top = 25
        Width = 177
        Checked = True
       END CREATE
       CREATE IDE_Conf_SaveSettingsOnExit AS QCHECKBOX
        CAPTION = "Save Settings on Exit"
        Left = 12
        Top = 55
        Width = 144
        TabOrder = 2
        Checked = True
       END CREATE
       CREATE IDE_Conf_SwitchToSubView AS QCHECKBOX
        CAPTION = "Switch to Sub/Func View after load"
        Left = 12
        Top = 85
        Width = 230
        TabOrder = 1
        Checked = True
       END CREATE
       CREATE IDE_Conf_SortSubs AS QCHECKBOX
        CAPTION = "Sort Sub/Func Names"
        Left = 12
        Top = 115
        Width = 230
        TabOrder = 1
        Checked = True
       END CREATE

       CREATE IDE_Conf_SingleInstance AS QCHECKBOX
        CAPTION = "Run only one instance of FreeQ IDE"
        Left = 12
        Top = 145
        Width = 230
        TabOrder = 4
       END CREATE

       CREATE IDE_Conf_NewFileAtStartUp AS QCHECKBOX
        CAPTION = "Open new tab at Startup"
        Left = 12
        Top = 175
        Width = 230
        TabOrder = 10
       END CREATE

       CREATE IDE_Conf_MenuIcons AS QCHECKBOX
        CAPTION = "Show Menu Icons"
        Hint = "Setting icons requires a program restart"
        ShowHint = True
        Left = 12
        Top = 205
        Width = 230
        TabOrder = 11
       END CREATE

       CREATE IDE_Conf_ShowWelcome AS QCHECKBOX
        CAPTION = "App Wizard/ Welcome at Startup"
        Hint = "Open the application wizard and welcome screen at startup"
        ShowHint = True
        Left = 12
        Top = 235
        Width = 230
        TabOrder = 12
       END CREATE


        'right side
       CREATE IDE_Conf_BackupFiles AS QCHECKBOX
        CAPTION = "Backup Files"
        Left = 362
        Top = 25
        Width = 230
        TabOrder = 6
       END CREATE

       CREATE IDE_Conf_BackupFilesExt AS QEDIT
        Left = 362
        Top = 55
        Width = 230
        TabOrder = 7
        Text = IDE.BackupFilesExt
        Hint = "Extension for Backup File"
        ShowHint = True
       END CREATE

       CREATE IDE_Conf_HighlightBraces AS QCHECKBOX
        CAPTION = "Highlight Braces (missing)"
        Left = 362
        Top = 85
        Width = 230
        TabOrder = 8
       END CREATE

       CREATE IDE_Conf_AutoComplete AS QCHECKBOX
        CAPTION = "Auto Complete"
        Left = 362
        Top = 115
        Width = 230
        TabOrder = 9
       END CREATE

       CREATE IDE_Conf_NewFileLabel AS QLABEL
        CAPTION = "Name of New file"
        Left = 362
        Top = 145
        Width = 230
       END CREATE

       CREATE IDE_Conf_NewFileNameEdit AS QEDIT
        Left = 362
        Top = 170
        Width = 230
        TabOrder = 10
        Text = IDE.NewFileName
        Hint = "Default name for inserting new file into editor"
        ShowHint = True
       END CREATE

       CREATE IDE_Conf_NewFileAutoSave AS QCHECKBOX
        CAPTION = "Auto Save New file"
        Left = 362
        Top = 195
        Width = 230
        TabOrder = 11
       END CREATE

       CREATE IDE_Conf_AutoOpenLastProj AS QCHECKBOX
        CAPTION = "Auto open last project"
        Left = 362
        Top = 220
        Width = 230
        Checked = False
        TabOrder = 12
       END CREATE


        'bottom left
       CREATE IDE_Conf_AutoDeclGroupBox AS QGROUPBOX
        CAPTION = "Auto Declare Defaults"
        Left = 10
        Top = 267
        Width = 372
        Height = 196
        TabOrder = 3
        CREATE IDE_Conf_AutoDeclClipboardActiveFile AS QRADIOBUTTON
         CAPTION = "Declare statements to Clipboard (active file only)"
         Left = 18
         Top = 25
         Width = 280
        END CREATE
        CREATE IDE_Conf_AutoDeclClipboardAllFiles AS QRADIOBUTTON
         CAPTION = "Declare statments to Clipboard (all open files)"
         Left = 18
         Top = 52
         Width = 280
         TabOrder = 1
        END CREATE
        CREATE IDE_Conf_AutoDeclAtTopActiveFile AS QRADIOBUTTON
         CAPTION = "Put Declare statements at the top (active file only)"
         Left = 18
         Top = 78
         Width = 280
         TabOrder = 2
        END CREATE
        CREATE IDE_Conf_AutoDeclAtTopAllFiles AS QRADIOBUTTON
         CAPTION = "Put Declare statements at the top of each open file"
         Left = 18
         Top = 103
         Width = 280
         TabOrder = 4
        END CREATE
        CREATE IDE_Conf_AutoDeclInFile AS QRADIOBUTTON
         CAPTION = "Put All Declare statements in a file named:"
         Left = 18
         Top = 136
         Width = 280
         TabOrder = 5
        END CREATE
        CREATE IDE_Conf_AutoDeclInFileName AS QEDIT
         Text = IDE.AutoDeclInFileName
         Left = 16
         Top = 160
         Width = 333
         TabOrder = 3
        END CREATE
       END CREATE
      END CREATE


'____________________Panel with FreeBasic compiler paths and options___________________________________________
      CREATE IDE_Conf_FBPathsGroupBox AS QGROUPBOX
       Font.Size=11
       CAPTION = "FreeBasic Paths / Compiler Options"
       Left = 11
       Top = 32
       Width = IDE_Conf_TabControl.Width - 22
       Height = IDE_Conf_TabControl.Height - 48
       TabOrder = 3
       Visible = False
       CREATE IDE_Conf_FBCompilerLabel AS QLABEL
        CAPTION = "Compiler location"
        Left = 12
        Top = 24
        Width = 180
        Transparent = 1
       END CREATE
       CREATE IDE_Conf_FBCommandLineLabel AS QLABEL
        CAPTION = "Special command line options"
        Left = 12
        Top = 98
        Width = 220
        Transparent = 1
       END CREATE
       CREATE IDE_Conf_FBHelpFileLabel AS QLABEL
        CAPTION = "Help file"
        Left = 16
        Top = 184
        Width = 180
        Height = 22
        Transparent = 1
       END CREATE

       CREATE IDE_Conf_FBCompilerPathEdit AS QEDIT
        Text = "\Program Files\FreeBasic\fbc.exe"
        Left = 12
        Top = 47
        Width = 329
        TabOrder = 3
       END CREATE
       CREATE IDE_Conf_FBCompilerPathSearchButton AS QBUTTON
        CAPTION = "..."
        Left = 349
        Top = 45
        Width = 36
        Height = 26
        TabOrder = 4
        Tag = 10
        OnClick = IDE_Conf_FindPathTarget
       END CREATE
       CREATE IDE_Conf_FBCommandLineEdit AS QEDIT
        Text = ""
        Left = 12
        Top = 120
        Width = 329
        TabOrder = 6
        ShowHint = True
        Hint = _
         "-a <name>      Add an object file to linker's list" + CRLF + _
         "-arch <type>   Set target architecture (default: 486)" + CRLF + _
         "-b <name>      Add a source file to compilation" + CRLF + _
         "-c             Compile only, do not link" + CRLF + _
         "-C             Do not delete the object file(s)" + CRLF + _
         "-d <name=val>  Add a preprocessor's define" + CRLF + _
         "-dll, -dylib   Create a DLL, including the import library" + CRLF + _
         "-e             Add error checking" + CRLF + _
         "-ex            Add error checking with RESUME support" + CRLF + _
         "-exx           Same as above plus array bounds and null-pointer checking" + CRLF + _
         "-export        Export symbols for dynamic linkage" + CRLF + _
         "-g             Add debug info" + CRLF + _
         "-i <name>      Add a path to search for include files" + CRLF + _
         "-include <name> Include a header file on each source compiled" + CRLF + _
         "-l <name>      Add a library file to linker's list" + CRLF + _
         "-lang <name>   Select language compatibility: deprecated, fblite, qb" + CRLF + _
         "-lib           Create a static library" + CRLF + _
         "-m <name>      Main file w/o ext, the entry point (def: 1st .bas on list)" + CRLF + _
         "-map <name>    Save the linking map to file name" + CRLF + _
         "-maxerr <val>  Only stop parsing if <val> errors occurred" + CRLF + _
         "-mt            Link with thread-safe runtime library" + CRLF + _
         "-nodeflibs     Do not include the default libraries" + CRLF + _
         "-noerrline     Do not show source line where error occurred" + CRLF + _
         "-o <name>      Set object file path/name (must be passed after the .bas file)" + CRLF + _
         "-p <name>      Add a path to search for libraries" + CRLF + _
         "-prefix <path> Set the compiler prefix path" + CRLF + _
         "-profile       Enable function profiling" + CRLF + _
         "-r             Write asm only, do not compile" + CRLF + _
         "-R             Do not delete the asm file(s)" + CRLF + _
         "-s <name>      Set subsystem (gui, console)" + CRLF + _
         "-t <value>     Set stack size in kbytes (default: 1M)" + CRLF + _
         "-target <name> Cross-compile to: cygwin dos" + CRLF + _
         "-v             Be verbose" + CRLF + _
         "-version       Show compiler version" + CRLF + _
         "-w <value>     Set min warning level: all, pedantic or a value" + CRLF + _
         "-Wa <opt>      Pass options to GAS (separated by commas)" + CRLF + _
         "-Wl <opt>      Pass options to LD (separated by commas)" + CRLF + _
         "-x <name>      Set executable/library path/name"

       END CREATE
       CREATE IDE_Conf_FBHelpFilePathEdit AS QEDIT
        Text = "\Program Files\FreeBasic\freebasic.chm"
        Left = 12
        Top = 203
        Width = 329
        TabOrder = 5
       END CREATE
       CREATE IDE_Conf_FBHelpPathSearchButton AS QBUTTON
        CAPTION = "..."
        Left = 349
        Top = 201
        Width = 36
        Height = 26
        TabOrder = 6
        Tag = 16
        OnClick = IDE_Conf_FindPathTarget
       END CREATE
      END CREATE

'____________________Panel with ShorCuts __________________________________________________
      CREATE IDE_Conf_Shortcut_GroupBox AS QGROUPBOX
       CAPTION = "Short Cut Keys"
       Left = 11
       Top = 32
       Width = IDE_Conf_TabControl.Width - 22
       Height = IDE_Conf_TabControl.Height - 48

       CREATE IDE_Conf_Menus_DefaultsButton AS QBUTTON
        CAPTION = "Default keys"
        Left = 24
        Top = 435
        Width = 120
        Height = 22
        OnClick = IDE_Conf_Menus_DefaultButton_Click
       END CREATE
       CREATE IDE_Conf_Menus_LoadButton AS QBUTTON
        CAPTION = "Load settings..."
        Left = 240
        Top = 435
        Width = 120
        Height = 22
        OnClick = IDE_Conf_Menus_LoadButton_Click
       END CREATE
       CREATE IDE_Conf_Menus_SaveButton AS QBUTTON
        CAPTION = "Save settings..."
        Left = 450
        Top = 435
        Width = 120
        Height = 22
        OnClick = IDE_Conf_Menus_SaveButton_Click
       END CREATE
       CREATE IDE_Conf_MenuGrid AS QSTRINGGRID
        Tag = False             'signal loading
        Font.Size = 10
        Left = 11
        Top = 14
        Height = 416
        Width = 600
        FixedCols = 0
        ColCount = 3
        RowCount = 120          'max menu shortcuts in app!
        Col = 0
        Row = 1
        ColWidths(0) = 240
        ColWidths(1) = 240
        ColWidths(2) = 80
        DefaultRowHeight = 20
        Separator = ","
        AddOptions(goEditing, goAlwaysShowEditor, goThumbTracking, goTabs)
        Cell(0,0) = "Menu Caption"
        Cell(1,0) = "ShortCut"
        Cell(2,0) = "Visible"
       END CREATE
      END CREATE      'Shortcut tab



'____________________Panel with External applications ________________________________________________
      CREATE IDE_Conf_ExternAppGroupBox AS QGROUPBOX
       CAPTION = "External Apps"
       Left = 11
       Top = 32
       Width = IDE_Conf_TabControl.Width - 22
       Height = IDE_Conf_TabControl.Height - 48

       CREATE IDE_Conf_ExternAppLabel1 AS QLABEL
        CAPTION = "App 1"
        Left = 12
        Top = 25
        Width = 40
        Transparent = 1
       END CREATE
       CREATE IDE_Conf_ExternApp1 AS QEDIT
        Text = ""
        Left = IDE_Conf_ExternAppLabel1.Left + IDE_Conf_ExternAppLabel1.Width + 8
        Top = IDE_Conf_ExternAppLabel1.Top
        Width = 515
       END CREATE
       CREATE IDE_Conf_ExternApp1SearchButton AS QBUTTON
        CAPTION = "..."
        Left = IDE_Conf_ExternApp1.Left + IDE_Conf_ExternApp1.Width + 8
        Top = IDE_Conf_ExternApp1.Top
        Width = 36
        Height = 24
        TabOrder = 4
        Tag = 21
        OnClick = IDE_Conf_FindPathTarget
       END CREATE
        '====================================================

       CREATE IDE_Conf_ExternAppLabel2 AS QLABEL
        CAPTION = "App 2"
        Left = 12
        Top = 65
        Width = 40
        Transparent = 1
       END CREATE
       CREATE IDE_Conf_ExternApp2 AS QEDIT
        Text = ""
        Left = IDE_Conf_ExternAppLabel2.Left + IDE_Conf_ExternAppLabel2.Width + 8
        Top = IDE_Conf_ExternAppLabel2.Top
        Width = 515
        TabOrder = 1
       END CREATE
       CREATE IDE_Conf_ExternApp2SearchButton AS QBUTTON
        CAPTION = "..."
        Left = IDE_Conf_ExternApp2.Left + IDE_Conf_ExternApp2.Width + 8
        Top = IDE_Conf_ExternApp2.Top
        Width = 36
        Height = 24
        TabOrder = 4
        Tag = 22
        OnClick = IDE_Conf_FindPathTarget
       END CREATE

        '====================================================
       CREATE IDE_Conf_ExternAppLabel3 AS QLABEL
        CAPTION = "App 3"
        Left = 12
        Top = 105
        Width = 40
        COLOR = 0
        Transparent = 1
       END CREATE
       CREATE IDE_Conf_ExternApp3 AS QEDIT
        Text = ""
        Left = IDE_Conf_ExternAppLabel3.Left + IDE_Conf_ExternAppLabel3.Width + 8
        Top = IDE_Conf_ExternAppLabel3.Top
        Width = 515
        TabOrder = 2
       END CREATE
       CREATE IDE_Conf_ExternApp3SearchButton AS QBUTTON
        CAPTION = "..."
        Left = IDE_Conf_ExternApp3.Left + IDE_Conf_ExternApp3.Width + 8
        Top = IDE_Conf_ExternApp3.Top
        Width = 36
        Height = 24
        TabOrder = 4
        Tag = 23
        OnClick = IDE_Conf_FindPathTarget
       END CREATE

        '====================================================
       CREATE IDE_Conf_ExternAppLabel4 AS QLABEL
        CAPTION = "App  4"
        Left = 12
        Top = 145
        Width = 40
        COLOR = 0
        Transparent = 1
       END CREATE
       CREATE IDE_Conf_ExternApp4 AS QEDIT
        Text = ""
        Left = IDE_Conf_ExternAppLabel4.Left + IDE_Conf_ExternAppLabel4.Width + 8
        Top = IDE_Conf_ExternAppLabel4.Top
        Width = 515
        TabOrder = 3
       END CREATE
       CREATE IDE_Conf_ExternApp4SearchButton AS QBUTTON
        CAPTION = "..."
        Left = IDE_Conf_ExternApp4.Left + IDE_Conf_ExternApp4.Width + 8
        Top = IDE_Conf_ExternApp4.Top
        Width = 36
        Height = 24
        TabOrder = 4
        Tag = 24
        OnClick = IDE_Conf_FindPathTarget
       END CREATE


       CREATE IDE_Conf_ExternAppInfoLabel AS QLABEL
        Font.Size = 10
        CAPTION = "Substitutions:" + CRLF + _
         "%FILE% = FileName of active file" + CRLF + _
         "%FILENAME% = Full path and FileName of active file" + CRLF + _
         "%EXT% = File extension of active file" + CRLF + _
         "%CURRPATH% = Current Path" + CRLF + _
         "%PATH% = Path of active file" + CRLF + _
         "%APPPATH% = Path of FreeQ exe"
        Left = 14
        Top = IDE_Conf_ExternAppLabel4.Top + IDE_Conf_ExternAppLabel4.Height + 22
        Width = 369
        Height = 140
        Transparent = 1
       END CREATE


    '----- Special external apps ------
       CREATE IDE_Conf_upxAppLabel AS QLABEL
        CAPTION = "UPX de/compressor"
        Font.Size = 11
        Left = 12
        Top = IDE_Conf_ExternAppInfoLabel.Top + IDE_Conf_ExternAppInfoLabel.Height + 18
        Width = 240
        COLOR = 0
        Transparent = 1
       END CREATE
       CREATE IDE_Conf_upxApp AS QEDIT
        Text = ""
        Left = 12
        Top = IDE_Conf_upxAppLabel.Top + 18
        Width = 550
        TabOrder = 3
       END CREATE
       CREATE IDE_Conf_upxAppSearchButton AS QBUTTON
        CAPTION = "..."
        Left = IDE_Conf_upxApp.Left + IDE_Conf_upxApp.Width + 8
        Top = IDE_Conf_upxApp.Top
        Width = 36
        Height = 22
        TabOrder = 7
        Tag = 30
        OnClick = IDE_Conf_FindPathTarget
       END CREATE

       CREATE IDE_Conf_upxDecompressExe AS QCHECKBOX
        Left = IDE_Conf_upxApp.Left
        Top = IDE_Conf_upxApp.Top + IDE_Conf_upxApp.Height + 8
        Width = 240
        CAPTION = "Decompress output exe"
        Checked = False
       END CREATE

       CREATE IDE_Conf_ResHackerAppLabel AS QLABEL
        CAPTION = "ResHacker"
        Font.Size = 11
        Left = 12
        Top = IDE_Conf_upxApp.Top + IDE_Conf_upxApp.Height + 38
        Width = 240
        COLOR = 0
        Transparent = 1
       END CREATE
       CREATE IDE_Conf_ResHackerApp AS QEDIT
        Text = ""
        Left = 12
        Top = IDE_Conf_ResHackerAppLabel.Top + 18
        Width = 550
        TabOrder = 3
       END CREATE
       CREATE IDE_Conf_ResHackerAppSearchButton AS QBUTTON
        CAPTION = "..."
        Left = IDE_Conf_ResHackerApp.Left + IDE_Conf_ResHackerApp.Width + 8
        Top = IDE_Conf_ResHackerApp.Top
        Width = 36
        Height = 22
        TabOrder = 8
        Tag = 31
        OnClick = IDE_Conf_FindPathTarget
       END CREATE

      END CREATE          'External applications tab


     END CREATE      'config form

'=====  set to first tab =============
     IDE_Conf_TabControl.TabIndex = 0
     IDE_Conf_TabChange
'======================================

     SUB IDE_Conf_Form_Close
      IDE_Conf_Form.CLOSE
     END SUB



     SUB IDE_Conf_Form_Show
'    IF IDE.MFEActiveProject <> "" THEN              'allow save to project only
'        IDE_Conf_SaveProjButton.Visible = True
'    ELSE
'        IDE_Conf_SaveProjButton.Visible = False     'else allow default config save
'    END IF
      IDE_Conf_Form.SHOWMODAL
     END SUB


     SUB IDE_Conf_TabChange
      SELECT CASE IDE_Conf_TabControl.TabIndex
      CASE 0
       IDE_Conf_EditorGroupBox.Visible = True
       IDE_Conf_OtherGroupBox.Visible = False
       IDE_Conf_Shortcut_GroupBox.Visible = False
       IDE_Conf_PathsGroupBox.Visible = False
       IDE_Conf_FBPathsGroupBox.Visible = False
       IDE_Conf_ExternAppGroupBox.Visible = False
      CASE 1
       IDE_Conf_EditorGroupBox.Visible = False
       IDE_Conf_OtherGroupBox.Visible = True
       IDE_Conf_Shortcut_GroupBox.Visible = False
       IDE_Conf_PathsGroupBox.Visible = False
       IDE_Conf_FBPathsGroupBox.Visible = False
       IDE_Conf_ExternAppGroupBox.Visible = False
      CASE 2
       IDE_Conf_EditorGroupBox.Visible = False
       IDE_Conf_OtherGroupBox.Visible = False
       IDE_Conf_Shortcut_GroupBox.Visible = True
       IDE_Conf_PathsGroupBox.Visible = False
       IDE_Conf_FBPathsGroupBox.Visible = False
       IDE_Conf_ExternAppGroupBox.Visible = False
      CASE 3
       IDE_Conf_EditorGroupBox.Visible = False
       IDE_Conf_OtherGroupBox.Visible = False
       IDE_Conf_Shortcut_GroupBox.Visible = False
       IDE_Conf_PathsGroupBox.Visible = True
       IDE_Conf_FBPathsGroupBox.Visible = False
       IDE_Conf_ExternAppGroupBox.Visible = False
      CASE 4
       IDE_Conf_EditorGroupBox.Visible = False
       IDE_Conf_OtherGroupBox.Visible = False
       IDE_Conf_Shortcut_GroupBox.Visible = False
       IDE_Conf_PathsGroupBox.Visible = False
       IDE_Conf_FBPathsGroupBox.Visible = True
       IDE_Conf_ExternAppGroupBox.Visible = False
      CASE 5
       IDE_Conf_EditorGroupBox.Visible = False
       IDE_Conf_PathsGroupBox.Visible = False
       IDE_Conf_OtherGroupBox.Visible = False
       IDE_Conf_FBPathsGroupBox.Visible = False
       IDE_Conf_Shortcut_GroupBox.Visible = False
       IDE_Conf_ExternAppGroupBox.Visible = True
      END SELECT
     END SUB


     SUB IDE_Conf_CompileOpt_Show
    'IDE_Conf_Form.Show
      IDE_Conf_TabControl.TabIndex = 3
      IDE_Conf_TabChange
      IDE_Conf_Form_Show
     END SUB

     SUB IDE_Cong_ShowExternApp      '=====  set to extern app tab =============
    'IDE_Conf_Form.Show
      IDE_Conf_TabControl.TabIndex = 5
      IDE_Conf_TabChange
      IDE_Conf_Form_Show
     END SUB




'------------------------------------------------------
'------------------------------------------------------
'  set the global variables from the form values
'  then save them to the ini file
'------------------------------------------------------
'------------------------------------------------------


     SUB IDE_Conf_Form_SaveVars
      IDE.MainFont.COLOR    =     IDE_Conf_FontColorLabel.COLOR
      IDE.BackGround    =         IDE_Conf_FontBackLabel.COLOR
      IDE.FileTabContolBack    =  IDE_Conf_TabBackLabel.COLOR
      IDE.FileTabContolInactive = IDE_Conf_TabInactiveLabel.COLOR
      IDE.SelectionFore    =      IDE_Conf_SelForeLabel.COLOR
      IDE.SelectionBack    =      IDE_Conf_SelBackLabel.COLOR
      IDE.LineNumbersFore    =    IDE_Conf_LineNumForeLabel.COLOR
      IDE.LineNumbersBack    =    IDE_Conf_LineNumBackLabel.COLOR
      IDE.ActiveLineBack  =       IDE_Conf_ActiveLineBackLabel.COLOR
      IDE.TabSpaces     =         VAL(IDE_Conf_NumSpacesForTabsEdit.Text)
      IDE.UseTabs    =            IDE_Conf_UseTabsCheckBox.Checked
      IDE.LineNumbers =           IDE_Conf_LineNumCheckBox.Checked
      IDE.AutoIndent    =         IDE_Conf_AutoIndentCheckBox.Checked
      IDE.CodeFolding    =        IDE_Conf_CodeFoldingCheckBox.Checked
      IDE.ViewIndents    =        IDE_Conf_ViewIndentsCheckBox.Checked
      IDE.HiLighting  =           IDE_Conf_HiLiteCheckBox.Checked
      IDE.WordWrap =              IDE_Conf_WordWrapCheckBox.Checked

      IDE.UseAppDirectory =       IDE_Conf_UseAppDirectory.Checked
      IDE.ConstPath =             IDE_Conf_ConstDirectory.Text
      IDE.CompilerPath    =    IDE_Conf_CompilerPathEdit.Text
      IDE.CompilerHelpFile    =    IDE_Conf_HelpFilePathEdit.Text
      IDE.CompilerLibPath    =    IDE_Conf_LibPathEdit.Text
      IDE.CompilerIconPath    =    IDE_Conf_IconPathEdit.Text
      IDE.CompilerIncPath    =    IDE_Conf_IncludePathEdit.Text
      IDE.CompilerTemplatePath    =    IDE_Conf_TemplatesPathEdit.Text

      IDE.FBCompilerPath    =    IDE_Conf_FBCompilerPathEdit.Text
      IDE.FBCommandLIne =         IDE_Conf_FBCommandLineEdit.Text
      IDE.FBCompilerHelpFile    =    IDE_Conf_FBHelpFilePathEdit.Text

      IDE.OptimizeOn    =    IDE_Conf_OptimizeCheckBox.Checked
      IDE.TypeCheckOn    =    IDE_Conf_TypeCheckCheckBox.Checked
      IDE.VerboseOn    =    IDE_Conf_VerboseCheckBox.Checked
      IDE.ByteCodeOn  =   IDE_Conf_ByteCodeCheckBox.Checked
      IDE.GenerateManifest    =    IDE_Conf_GenManifestCheckBox.Checked
      IDE.SaveFileBeforeCompile    =    IDE_Conf_SaveBeforeCompileCheckBox.Checked
      IDE.SaveAllBeforeCompile    =   IDE_Conf_SaveAllBeforeCompileCheckBox.Checked
      IDE.ScriptBeforeCompile    =    IDE_Conf_RunScriptEdit.Text
      IDE.SingleInstanceOnly        =     IDE_Conf_SingleInstance.Checked
      IDE.ShowSplashScreen        =     IDE_Conf_ShowSplashScreen.Checked
      IDE.SaveSettingsOnExit        =     IDE_Conf_SaveSettingsOnExit.Checked
      IDE.ShowSubsAfterLoad        =     IDE_Conf_SwitchToSubView.Checked
      IDE.SortSubs        =     IDE_Conf_SortSubs.Checked
      IDE.HiLightCompileErr        =     IDE_Conf_HiLightCompileErr.Checked
      IDE.BackupFiles        =     IDE_Conf_BackupFiles.Checked
      IDE.BackupFilesExt        =     IDE_Conf_BackupFilesExt.Text
      IDE.HighlightBraces        =     IDE_Conf_HighlightBraces.Checked
      IDE.AutoComplete        =  IDE_Conf_AutoComplete.Checked
      IDE.NewTabAtStartup     =  IDE_Conf_NewFileAtStartUp.Checked
      IDE.NewFileName         = IDE_Conf_NewFileNameEdit.Text
      IDE.NewFileAutoSave     = IDE_Conf_NewFileAutoSave.Checked
      IDE.AutoOpenLastProj    = IDE_Conf_AutoOpenLastProj.Checked
      IDE.ShowWelcome         = IDE_Conf_ShowWelcome.Checked
      IDE.MenuIcons           = IDE_Conf_MenuIcons.Checked

      IDE.AutoDeclClipboardActiveFile        =     IDE_Conf_AutoDeclClipboardActiveFile.Checked
      IDE.AutoDeclClipboardAllFiles        =     IDE_Conf_AutoDeclClipboardAllFiles.Checked
      IDE.AutoDeclAtTopActiveFile        =     IDE_Conf_AutoDeclAtTopActiveFile.Checked
      IDE.AutoDeclAtTopAllFiles        =     IDE_Conf_AutoDeclAtTopAllFiles.Checked
      IDE.AutoDeclInFile              =     IDE_Conf_AutoDeclInFile.Checked
      IDE.AutoDeclInFileName        =     IDE_Conf_AutoDeclInFileName.Text

      IDE.SearchEngine           =    IDE_Conf_WebSearchEdit.Text

      IDE.ExternalApp1           = IDE_Conf_ExternApp1.Text
      IDE.ExternalApp2           = IDE_Conf_ExternApp2.Text
      IDE.ExternalApp3           = IDE_Conf_ExternApp3.Text
      IDE.ExternalApp4           = IDE_Conf_ExternApp4.Text

      IDE.upx                     = IDE_Conf_upxApp.Text
      IDE.ResHacker               = IDE_Conf_ResHackerApp.Text
      IDE.DecompressEXE           = IDE_Conf_upxDecompressExe.Checked

      IDE.EmbedManifest	=	    IDE_Conf_ManifestEmbedCheckBox.Checked
      IDE.EmbedVersionInfo	=   IDE_Conf_VersionInfoCheckBox.Checked
      IDE.FileVersion 	=	    IDE_Conf_VersionInfoGrid.Cell(1,1)
      IDE.ProductVersion 	=	    IDE_Conf_VersionInfoGrid.Cell(1,2)
      IDE.CompanyName 	=	    IDE_Conf_VersionInfoGrid.Cell(1,6)
      IDE.CompanyEmail 	=	    IDE_Conf_VersionInfoGrid.Cell(1,7)
      IDE.FileDescription 	=	IDE_Conf_VersionInfoGrid.Cell(1,8)
      IDE.LegalCopyright 	=	    IDE_Conf_VersionInfoGrid.Cell(1,11)

      WriteIDEVariables(True)
      IDE_Conf_Form.CLOSE
      SetIDEVariables             'activate settings
     END SUB



'------------------------------------------------------
'------------------------------------------------------
'populate the form values with the global variables
'------------------------------------------------------
'------------------------------------------------------

     SUB IDE_Conf_Form_Refresh
'     IDE_Conf_FontColorLabel.Color         = IDE.MainFont.Color
'     IDE_Conf_FontBackLabel.Color          = IDE.BackGround
      IDE_Conf_TabBackLabel.COLOR           = IDE.FileTabContolBack
      IDE_Conf_TabInactiveLabel.COLOR       = IDE.FileTabContolInactive
      IDE_Conf_SelForeLabel.COLOR           = IDE.SelectionFore
      IDE_Conf_SelBackLabel.COLOR           = IDE.SelectionBack
      IDE_Conf_LineNumForeLabel.COLOR       = IDE.LineNumbersFore
      IDE_Conf_LineNumBackLabel.COLOR       = IDE.LineNumbersBack
      IDE_Conf_ActiveLineBackLabel.COLOR    = IDE.ActiveLineBack

      IF IDE_Conf_ActiveLineBackLabel.COLOR = -1 THEN
       IDE_Conf_ActiveLineBackLabel.Visible = False
       IDE_Conf_ActiveLineBackButton.Checked = False
      ELSE
       IDE_Conf_ActiveLineBackLabel.Visible = True
       IDE_Conf_ActiveLineBackButton.Checked = True
      END IF

      IDE_Conf_NumSpacesForTabsEdit.Text    = STR$(IDE.TabSpaces)
      IDE_Conf_UseTabsCheckBox.Checked      = IDE.UseTabs
      IDE_Conf_LineNumCheckBox.Checked      = IDE.LineNumbers
      IDE_Conf_AutoIndentCheckBox.Checked   = IDE.AutoIndent
      IDE_Conf_CodeFoldingCheckBox.Checked  = IDE.CodeFolding
      IDE_Conf_ViewIndentsCheckBox.Checked  = IDE.ViewIndents
      IDE_Conf_HiLiteCheckBox.Checked       = IDE.HiLighting
      IDE_Conf_WordWrapCheckBox.Checked     = IDE.WordWrap

      IF RIGHT$(IDE.CompilerLibPath, 1) = "\" THEN
       IDE.CompilerLibPath = LEFT$(IDE.CompilerLibPath, LEN(IDE.CompilerLibPath)-1)
      END IF
      IF RIGHT$(IDE.CompilerIconPath, 1) = "\" THEN
       IDE.CompilerIconPath = LEFT$(IDE.CompilerIconPath, LEN(IDE.CompilerIconPath)-1)
      END IF
      IF RIGHT$(IDE.CompilerIncPath, 1) = "\" THEN
       IDE.CompilerIncPath = LEFT$(IDE.CompilerIncPath, LEN(IDE.CompilerIncPath)-1)
      END IF

      IDE_Conf_CompilerPathEdit.Text = IDE.CompilerPath
      IDE_Conf_HelpFilePathEdit.Text = IDE.CompilerHelpFile
      IDE_Conf_LibPathEdit.Text = IDE.CompilerLibPath
      IDE_Conf_IconPathEdit.Text = IDE.CompilerIconPath
      IDE_Conf_IncludePathEdit.Text = IDE.CompilerIncPath
      IDE_Conf_TemplatesPathEdit.Text = IDE.CompilerTemplatePath

      IDE_Conf_FBCompilerPathEdit.Text = IDE.FBCompilerPath
      IF IDE.FBCommandLine <> "" THEN IDE_Conf_FBCommandLineEdit.Text = IDE.FBCommandLine
      IDE_Conf_FBHelpFilePathEdit.Text = IDE.FBCompilerHelpFile


      IDE_Conf_ManifestEmbedCheckBox.Checked = IDE.EmbedManifest
      IDE_Conf_VersionInfoCheckBox.Checked = IDE.EmbedVersionInfo
      IDE_Conf_VersionInfoGrid.Cell(1,1)  = IDE.FileVersion
      IDE_Conf_VersionInfoGrid.Cell(1,2) = IDE.ProductVersion
      IDE_Conf_VersionInfoGrid.Cell(1,6) = IDE.CompanyName
      IDE_Conf_VersionInfoGrid.Cell(1,7) = IDE.CompanyEmail
      IDE_Conf_VersionInfoGrid.Cell(1,8) = IDE.FileDescription
      IDE_Conf_VersionInfoGrid.Cell(1,11) = IDE.LegalCopyright

      IDE_Conf_OptimizeCheckBox.Checked = IDE.OptimizeOn
      IDE_Conf_TypeCheckCheckBox.Checked = IDE.TypeCheckOn
      IDE_Conf_VerboseCheckBox.Checked = IDE.VerboseOn
      IDE_Conf_ByteCodeCheckBox.Checked = IDE.ByteCodeOn
      IDE_Conf_GenManifestCheckBox.Checked = IDE.GenerateManifest
      IDE_Conf_SaveBeforeCompileCheckBox.Checked = IDE.SaveFileBeforeCompile
      IDE_Conf_SaveAllBeforeCompileCheckBox.Checked = IDE.SaveAllBeforeCompile

      IDE_Conf_UseAppDirectory.Checked = IDE.UseAppDirectory
      IF IDE_Conf_UseAppDirectory.Checked = False THEN
       IDE_Conf_ConstDirectory.Text = IDE.ConstPath
      ELSE
       IDE_Conf_ConstDirectory.Enabled = False
      END IF

      IDE_Conf_RunScriptEdit.Text = IDE.ScriptBeforeCompile
      IDE_Conf_FileExtensionsListBox.Text = IDE.FileFilter
      IDE_Conf_WebSearchEdit.Text = IDE.SearchEngine

    '--------------------Other options --------------------
      IDE_Conf_SingleInstance.Checked               = IDE.SingleInstanceOnly
      IDE_Conf_ShowSplashScreen.Checked             = IDE.ShowSplashScreen
      IDE_Conf_SaveSettingsOnExit.Checked           = IDE.SaveSettingsOnExit
      IDE_Conf_SwitchToSubView.Checked              = IDE.ShowSubsAfterLoad
      IDE_Conf_SortSubs.Checked                     = IDE.SortSubs
      IDE_Conf_HiLightCompileErr.Checked            = IDE.HiLightCompileErr
      IDE_Conf_BackupFiles.Checked                  = IDE.BackupFiles
      IDE_Conf_BackupFilesExt.Text                  = IDE.BackupFilesExt
      IDE_Conf_HighlightBraces.Checked              = IDE.HighlightBraces
      IDE_Conf_AutoComplete.Checked                 = IDE.AutoComplete
      IDE_Conf_NewFileAtStartUp.Checked             = IDE.NewTabAtStartup
      IDE_Conf_NewFileNameEdit.Text                 = IDE.NewFileName
      IDE_Conf_NewFileAutoSave.Checked              = IDE.NewFileAutoSave
      IDE_Conf_AutoOpenLastProj.Checked             = IDE.AutoOpenLastProj
      IDE_Conf_ShowWelcome.Checked                  = IDE.ShowWelcome
      IDE_Conf_MenuIcons.Checked                    = IDE.MenuIcons

      IDE_Conf_AutoDeclClipboardActiveFile.Checked  = IDE.AutoDeclClipboardActiveFile
      IDE_Conf_AutoDeclClipboardAllFiles.Checked    = IDE.AutoDeclClipboardAllFiles
      IDE_Conf_AutoDeclAtTopActiveFile.Checked      = IDE.AutoDeclAtTopActiveFile
      IDE_Conf_AutoDeclAtTopAllFiles.Checked        = IDE.AutoDeclAtTopAllFiles
      IDE_Conf_AutoDeclInFile.Checked               = IDE.AutoDeclInFile
      IDE_Conf_AutoDeclInFileName.Text              = IDE.AutoDeclInFileName

    '--------------------External applications --------------------
      IDE_Conf_ExternApp1.Text = IDE.ExternalApp1
      IDE_Conf_ExternApp2.Text = IDE.ExternalApp2
      IDE_Conf_ExternApp3.Text = IDE.ExternalApp3
      IDE_Conf_ExternApp4.Text = IDE.ExternalApp4

      IDE_Conf_upxApp.Text = IDE.upx
      IDE_Conf_ResHackerApp.Text = IDE.ResHacker
      IDE_Conf_upxDecompressExe.Checked = IDE.DecompressEXE

      IDE_Conf_RichEdit_Repaint
     END SUB





     SUB IDE_Conf_RichEdit_Repaint
      SELECT CASE IDE_Conf_TextRichEdit.ItemIndex 'WhereY
      CASE 0      'default
       IDE_Conf_FontColorLabel.COLOR         = IDE.MainFont.COLOR
       IDE_Conf_FontBackLabel.COLOR          = IDE.BackGround
       IDE_Conf_BoldCheckBox.Checked         = IDE.MainFont.Bold
       IDE_Conf_ItalicCheckBox.Checked       = IDE.MainFont.Italic
       IDE_Conf_UnderLineCheckBox.Checked    = IDE.MainFont.UnderLine
       IDE_Conf_ListBox.Clear
      CASE 1      'comment
       IDE_Conf_FontColorLabel.COLOR         = IDE.CommentFore
       IDE_Conf_FontBackLabel.COLOR          = IDE.CommentBack
       IDE_Conf_BoldCheckBox.Checked         = IDE.CommentBold
       IDE_Conf_ItalicCheckBox.Checked       = IDE.CommentItalic
       IDE_Conf_UnderLineCheckBox.Checked    = IDE.CommentUnderL
       IDE_Conf_ListBox.Clear
      CASE 2      'number
       IDE_Conf_FontColorLabel.COLOR         = IDE.NumberFore
       IDE_Conf_FontBackLabel.COLOR          = IDE.NumberBack
       IDE_Conf_BoldCheckBox.Checked         = IDE.NumberBold
       IDE_Conf_ItalicCheckBox.Checked       = IDE.NumberItalic
       IDE_Conf_UnderLineCheckBox.Checked    = IDE.CommentUnderL
       IDE_Conf_ListBox.Clear
      CASE 3      'strings
       IDE_Conf_FontColorLabel.COLOR         = IDE.StringFore
       IDE_Conf_FontBackLabel.COLOR          = IDE.StringBack
       IDE_Conf_BoldCheckBox.Checked         = IDE.StringBold
       IDE_Conf_ItalicCheckBox.Checked       = IDE.StringItalic
       IDE_Conf_UnderLineCheckBox.Checked    = IDE.StringUnderL
       IDE_Conf_ListBox.Clear
      CASE 4      'preprocessor
       IDE_Conf_FontColorLabel.COLOR         = IDE.PreProcessorFore
       IDE_Conf_FontBackLabel.COLOR          = IDE.PreProcessorBack
       IDE_Conf_BoldCheckBox.Checked         = IDE.PreProcessorBold
       IDE_Conf_ItalicCheckBox.Checked       = IDE.PreProcessorItalic
       IDE_Conf_UnderLineCheckBox.Checked    = IDE.PreProcessorUnderL
       IDE_Conf_ListBox.Clear
      CASE 5      'operator
       IDE_Conf_FontColorLabel.COLOR         = IDE.OperatorFore
       IDE_Conf_FontBackLabel.COLOR          = IDE.OperatorBack
       IDE_Conf_BoldCheckBox.Checked         = IDE.OperatorBold
       IDE_Conf_ItalicCheckBox.Checked       = IDE.OperatorItalic
       IDE_Conf_UnderLineCheckBox.Checked    = IDE.OperatorUnderL
       IDE_Conf_ListBox.Clear
      CASE 6      'Keywords
       IDE_Conf_FontColorLabel.COLOR         = IDE.KeywordFore
       IDE_Conf_FontBackLabel.COLOR          = IDE.KeywordBack
       IDE_Conf_BoldCheckBox.Checked         = IDE.KeywordBold
       IDE_Conf_ItalicCheckBox.Checked       = IDE.KeywordItalic
       IDE_Conf_UnderLineCheckBox.Checked    = IDE.KeywordUnderL
       IF IDE.KeyWordList.ItemCount > 0 THEN IDE_Conf_ListBox.Text = IDE.KeywordList.Text ELSE IDE_Conf_ListBox.Clear
      CASE 7      'Keywords2
       IDE_Conf_FontColorLabel.COLOR         = IDE.Keyword2Fore
       IDE_Conf_FontBackLabel.COLOR          = IDE.Keyword2Back
       IDE_Conf_BoldCheckBox.Checked         = IDE.Keyword2Bold
       IDE_Conf_ItalicCheckBox.Checked       = IDE.Keyword2Italic
       IDE_Conf_UnderLineCheckBox.Checked    = IDE.Keyword2UnderL
       IF IDE.KeyWordList2.ItemCount > 0 THEN IDE_Conf_ListBox.Text = IDE.KeyWordList2.Text ELSE IDE_Conf_ListBox.Clear
      CASE 8      'Keywords3
       IDE_Conf_FontColorLabel.COLOR         = IDE.Keyword3Fore
       IDE_Conf_FontBackLabel.COLOR          = IDE.Keyword3Back
       IDE_Conf_BoldCheckBox.Checked         = IDE.Keyword3Bold
       IDE_Conf_ItalicCheckBox.Checked       = IDE.Keyword3Italic
       IDE_Conf_UnderLineCheckBox.Checked    = IDE.Keyword3UnderL
       IF IDE.KeyWordList3.ItemCount > 0 THEN IDE_Conf_ListBox.Text = IDE.KeyWordList3.Text ELSE IDE_Conf_ListBox.Clear
      END SELECT
     END SUB




     SUB IDE_Conf_RichEdit_Store

      SELECT CASE IDE_Conf_TextRichEdit.ItemIndex 'WhereY
      CASE 0 'default
       IDE.MainFont.COLOR    =    IDE_Conf_FontColorLabel.COLOR
       IDE.BackGround    =    IDE_Conf_FontBackLabel.COLOR
       IDE.MainFont.Bold    =    IDE_Conf_BoldCheckBox.Checked
       IDE.MainFont.Italic    =    IDE_Conf_ItalicCheckBox.Checked
       IDE.MainFont.UnderLine    =    IDE_Conf_UnderLineCheckBox.Checked
      CASE 1 'comment
       IDE.CommentFore    =    IDE_Conf_FontColorLabel.COLOR
       IDE.CommentBack    =    IDE_Conf_FontBackLabel.COLOR
       IDE.CommentBold    =    IDE_Conf_BoldCheckBox.Checked
       IDE.CommentItalic    =    IDE_Conf_ItalicCheckBox.Checked
       IDE.CommentUnderL    =    IDE_Conf_UnderLineCheckBox.Checked
      CASE 2 'number
       IDE.NumberFore    =    IDE_Conf_FontColorLabel.COLOR
       IDE.NumberBack    =    IDE_Conf_FontBackLabel.COLOR
       IDE.NumberBold    =    IDE_Conf_BoldCheckBox.Checked
       IDE.NumberItalic    =    IDE_Conf_ItalicCheckBox.Checked
       IDE.CommentUnderL    =    IDE_Conf_UnderLineCheckBox.Checked
      CASE 3 'strings
       IDE.StringFore    =    IDE_Conf_FontColorLabel.COLOR
       IDE.StringBack    =    IDE_Conf_FontBackLabel.COLOR
       IDE.StringBold    =    IDE_Conf_BoldCheckBox.Checked
       IDE.StringItalic    =    IDE_Conf_ItalicCheckBox.Checked
       IDE.StringUnderL    =    IDE_Conf_UnderLineCheckBox.Checked
      CASE 4 'preprocessor
       IDE.PreProcessorFore    =    IDE_Conf_FontColorLabel.COLOR
       IDE.PreProcessorBack    =    IDE_Conf_FontBackLabel.COLOR
       IDE.PreProcessorBold    =    IDE_Conf_BoldCheckBox.Checked
       IDE.PreProcessorItalic    =    IDE_Conf_ItalicCheckBox.Checked
       IDE.PreProcessorUnderL    =    IDE_Conf_UnderLineCheckBox.Checked
      CASE 5 'operator
       IDE.OperatorFore    =    IDE_Conf_FontColorLabel.COLOR
       IDE.OperatorBack    =    IDE_Conf_FontBackLabel.COLOR
       IDE.OperatorBold    =    IDE_Conf_BoldCheckBox.Checked
       IDE.OperatorItalic    =    IDE_Conf_ItalicCheckBox.Checked
       IDE.OperatorUnderL    =    IDE_Conf_UnderLineCheckBox.Checked
      CASE 6 'Keywords
       IDE.KeywordFore    =    IDE_Conf_FontColorLabel.COLOR
       IDE.KeywordBack    =    IDE_Conf_FontBackLabel.COLOR
       IDE.KeywordBold    =    IDE_Conf_BoldCheckBox.Checked
       IDE.KeywordItalic    =    IDE_Conf_ItalicCheckBox.Checked
       IDE.KeywordUnderL    =    IDE_Conf_UnderLineCheckBox.Checked
      CASE 7 'Keywords2
       IDE.Keyword2Fore    =    IDE_Conf_FontColorLabel.COLOR
       IDE.Keyword2Back    =    IDE_Conf_FontBackLabel.COLOR
       IDE.Keyword2Bold    =    IDE_Conf_BoldCheckBox.Checked
       IDE.Keyword2Italic    =    IDE_Conf_ItalicCheckBox.Checked
       IDE.Keyword2UnderL    =    IDE_Conf_UnderLineCheckBox.Checked
      CASE 8 'Keywords3
       IDE.Keyword3Fore    =    IDE_Conf_FontColorLabel.COLOR
       IDE.Keyword3Back    =    IDE_Conf_FontBackLabel.COLOR
       IDE.Keyword3Bold    =    IDE_Conf_BoldCheckBox.Checked
       IDE.Keyword3Italic    =    IDE_Conf_ItalicCheckBox.Checked
       IDE.Keyword3UnderL    =    IDE_Conf_UnderLineCheckBox.Checked
      END SELECT

     END SUB


     SUB IDE_Conf_SelectColor(Sender AS QBUTTON)
      IDE_ColorSelector.Style = cdFullOpen
      IDE_ColorSelector.Top = Screen.MOUSEY
      IDE_ColorSelector.Left = Screen.MOUSEX
      IF IDE_ColorSelector.EXECUTE THEN
       SELECT CASE Sender.Handle

       CASE IDE_Conf_FontColorButton.handle
        IDE_Conf_FontColorLabel.COLOR = IDE_ColorSelector.COLOR
        IDE_Conf_RichEdit_Store
        IDE_Conf_RichEdit_Repaint

       CASE IDE_Conf_FontBackButton.handle
        IDE_Conf_FontBackLabel.COLOR = IDE_ColorSelector.COLOR
        IDE_Conf_RichEdit_Store
        IDE_Conf_RichEdit_Repaint

       CASE IDE_Conf_TabBackButton.handle    :   IDE.FileTabContolBack = IDE_ColorSelector.COLOR  :  IDE_Conf_TabBackLabel.COLOR = IDE_ColorSelector.COLOR
       CASE IDE_Conf_TabForeButton.handle    :   IDE.FileTabContolInactive = IDE_ColorSelector.COLOR  :  IDE_Conf_TabInactiveLabel.COLOR = IDE_ColorSelector.COLOR
       CASE IDE_Conf_SelForeButton.handle    :   IDE.SelectionFore = IDE_ColorSelector.COLOR  :  IDE_Conf_SelForeLabel.COLOR = IDE_ColorSelector.COLOR
       CASE IDE_Conf_SelBackButton.handle    :   IDE.SelectionBack = IDE_ColorSelector.COLOR  :  IDE_Conf_SelBackLabel.COLOR = IDE_ColorSelector.COLOR
       CASE IDE_Conf_LineNumForeButton.handle:   IDE.LineNumbersFore = IDE_ColorSelector.COLOR  :  IDE_Conf_LineNumForeLabel.COLOR = IDE_ColorSelector.COLOR
       CASE IDE_Conf_LineNumBackButton.handle:   IDE.LineNumbersBack = IDE_ColorSelector.COLOR  :  IDE_Conf_LineNumBackLabel.COLOR = IDE_ColorSelector.COLOR
       END SELECT
      END IF
     END SUB



     SUB IDE_Conf_ActiveLineSelectColor
      IDE_ColorSelector.Style = cdFullOpen
      IDE_ColorSelector.Top = Screen.MOUSEY
      IDE_ColorSelector.Left = Screen.MOUSEX
      IF IDE_ColorSelector.EXECUTE THEN
       IDE.ActiveLineBack = IDE_ColorSelector.COLOR
       IDE_Conf_ActiveLineBackLabel.COLOR = IDE_ColorSelector.COLOR
      END IF
     END SUB


     SUB WriteIDE_FormVariables
      ini.Section = "IDE_Variables"
      ini.write("MainFormLeft", STR$(IDE.MainFormLeft))      'MainForm.Left)) '
      ini.write("MainFormTop", STR$( IDE.MainFormTop))         'MainForm.Top))  '
      ini.write("MainFormWidth", STR$(IDE.MainFormWidth))      ' MainForm.Width))   '
      ini.write("MainFormHeight", STR$(IDE.MainFormHeight))    ' MainForm.Height))  '
      ini.write("RightSplitterPos",  STR$(IDE.RightSplitterPos))   ' RightSplitter.Left))  '
      ini.write("LeftSplitterPos",  STR$(IDE.LeftSplitterPos))  'LeftSplitter.Left))   '
      ini.write("FindReplaceFormLeft", STR$(FindReplaceForm.Left))
      ini.write("FindReplaceFormTop", STR$( FindReplaceForm.Top))
      ini.write("SetFindTransparency", STR$( FindTransparencyOnLostFocusBox.Checked))
      ini.write("FindTransparencyValue", STR$( FindReplaceTrackBar.Position))

      IF ComboBoxFind.ItemCount > 0 THEN IF TRIM$(ComboBoxFind.Item(0)) <> "" THEN ini.write("FindReplaceItem0", ComboBoxFind.Item(0))
      IF ComboBoxFind.ItemCount > 1 THEN IF TRIM$(ComboBoxFind.Item(1)) <> "" THEN ini.write("FindReplaceItem1", ComboBoxFind.Item(1))
      IF ComboBoxFind.ItemCount > 2 THEN IF TRIM$(ComboBoxFind.Item(2)) <> "" THEN ini.write("FindReplaceItem2", ComboBoxFind.Item(2))
      IF ComboBoxFind.ItemCount > 3 THEN IF TRIM$(ComboBoxFind.Item(3)) <> "" THEN ini.write("FindReplaceItem3", ComboBoxFind.Item(3))
      IF ComboBoxFind.ItemCount > 4 THEN IF TRIM$(ComboBoxFind.Item(4)) <> "" THEN ini.write("FindReplaceItem4", ComboBoxFind.Item(4))
      IF ComboBoxFind.ItemCount > 5 THEN IF TRIM$(ComboBoxFind.Item(5)) <> "" THEN ini.write("FindReplaceItem5", ComboBoxFind.Item(5))
      IF ComboBoxFind.ItemCount > 6 THEN IF TRIM$(ComboBoxFind.Item(6)) <> "" THEN ini.write("FindReplaceItem6", ComboBoxFind.Item(6))
      IF ComboBoxFind.ItemCount > 7 THEN IF TRIM$(ComboBoxFind.Item(7)) <> "" THEN ini.write("FindReplaceItem7", ComboBoxFind.Item(7))
      IF ComboBoxFind.ItemCount > 8 THEN IF TRIM$(ComboBoxFind.Item(8)) <> "" THEN ini.write("FindReplaceItem8", ComboBoxFind.Item(8))
      IF ComboBoxFind.ItemCount > 9 THEN IF TRIM$(ComboBoxFind.Item(9)) <> "" THEN ini.write("FindReplaceItem9", ComboBoxFind.Item(9))


     END SUB



     SUB WriteIDEVariables (ResetIt AS INTEGER)

      ini.Section = "IDE_Variables"

      ini.write("ShowSplashScreen", STR$(  IDE.ShowSplashScreen))
      ini.write("ViewQuickSearch",  STR$( IDE.ViewQuickSearch))
      ini.write("ViewStatusBar",  STR$( IDE.ViewStatusBar))
      ini.write("ViewLeftPanel",  STR$( IDE.ViewLeftPanel))
      ini.write("ViewRightPanel",  STR$( IDE.ViewRightPanel))
      ini.write("ViewBottomPanel",  STR$( IDE.ViewBottomPanel))
      ini.write("ViewTopPanel",  STR$( IDE.ViewTopPanel))
      ini.write("ViewFileToolPanel",  STR$( IDE.ViewFileToolPanel))
      ini.write("ViewEditToolPanel",  STR$( IDE.ViewEditToolPanel))
      ini.write("ViewCompileToolPanel",  STR$( IDE.ViewCompileToolPanel))
      ini.write("ViewViewToolPanel",  STR$( IDE.ViewViewToolPanel))
      ini.write("ViewCodeFoldingToolPanel",  STR$( IDE.ViewCodeFoldingToolPanel))
      ini.write("ViewFormatToolPanel",  STR$( IDE.ViewFormatToolPanel))
      ini.write("ViewBookMarkToolPanel",  STR$( IDE.ViewBookMarkToolPanel))
      ini.write("ViewIconToolPanel",  STR$( IDE.ViewIconToolPanel))
      ini.write("ViewWidgetToolPanel",  STR$( IDE.ViewWidgetToolPanel))

      ini.write("MainFont.Name", IDE.MainFont.Name)
      ini.write("MainFont.Size", STR$( IDE.MainFont.Size))
      ini.write("MainFont.Color", HEX$( IDE.MainFont.COLOR))
      ini.write("MainFont.Bold", STR$( IDE.MainFont.Bold))
      ini.write("MainFont.Italic", STR$( IDE.MainFont.Italic))
      ini.write("MainFont.Underline", STR$( IDE.MainFont.Underline))
      ini.write("BackGround", HEX$( IDE.BackGround))
      ini.write("SelectionFore", HEX$( IDE.SelectionFore))
      ini.write("SelectionBack", HEX$( IDE.SelectionBack))
      ini.write("LineNumbersFore", HEX$( IDE.LineNumbersFore))
      ini.write("LineNumbersBack", HEX$( IDE.LineNumbersBack))
      ini.write("CommentFore", HEX$( IDE.CommentFore))
      ini.write("CommentBack", HEX$( IDE.CommentBack))
      ini.write("CommentBold", STR$( IDE.CommentBold))
      ini.write("CommentItalic", STR$( IDE.CommentItalic))
      ini.write("CommentUnderL", STR$( IDE.CommentUnderL))
      ini.write("NumberFore", HEX$( IDE.NumberFore))
      ini.write("NumberBack", HEX$( IDE.NumberBack))
      ini.write("NumberBold", STR$( IDE.NumberBold))
      ini.write("NumberItalic", STR$( IDE.NumberItalic))
      ini.write("NumberUnderL", STR$( IDE.NumberUnderL))
      ini.write("StringFore", HEX$( IDE.StringFore))
      ini.write("StringBack", HEX$( IDE.StringBack))
      ini.write("StringBold", STR$( IDE.StringBold))
      ini.write("StringItalic", STR$( IDE.StringItalic))
      ini.write("StringUnderL", STR$( IDE.StringUnderL))
      ini.write("PreProcessorFore", HEX$( IDE.PreProcessorFore))
      ini.write("PreProcessorBack", HEX$( IDE.PreProcessorBack))
      ini.write("PreProcessorBold", STR$( IDE.PreProcessorBold))
      ini.write("PreProcessorItalic", STR$( IDE.PreProcessorItalic))
      ini.write("PreProcessorUnderL", STR$( IDE.PreProcessorUnderL))
      ini.write("OperatorFore", HEX$( IDE.OperatorFore))
      ini.write("OperatorBack", HEX$( IDE.OperatorBack))
      ini.write("OperatorBold", STR$( IDE.OperatorBold))
      ini.write("OperatorItalic", STR$( IDE.OperatorItalic))
      ini.write("OperatorUnderL", STR$( IDE.OperatorUnderL))
      ini.write("KeywordFore", HEX$( IDE.KeywordFore))
      ini.write("KeywordBack", HEX$( IDE.KeywordBack))
      ini.write("KeywordBold", STR$( IDE.KeywordBold))
      ini.write("KeywordItalic", STR$( IDE.KeywordItalic))
      ini.write("KeywordUnderL", STR$( IDE.KeywordUnderL))
      ini.write("Keyword2Fore", HEX$( IDE.Keyword2Fore))
      ini.write("Keyword2Back", HEX$( IDE.Keyword2Back))
      ini.write("Keyword2Bold", STR$( IDE.Keyword2Bold))
      ini.write("Keyword2Italic", STR$( IDE.Keyword2Italic))
      ini.write("Keyword2UnderL", STR$( IDE.Keyword2UnderL))
      ini.write("Keyword3Fore", HEX$( IDE.Keyword3Fore))
      ini.write("Keyword3Back", HEX$( IDE.Keyword3Back))
      ini.write("Keyword3Bold", STR$( IDE.Keyword3Bold))
      ini.write("Keyword3Italic", STR$( IDE.Keyword3Italic))
      ini.write("Keyword3UnderL", STR$( IDE.Keyword3UnderL))
      ini.write("FileTabContolBack", HEX$( IDE.FileTabContolBack))
      ini.write("FileTabContolInactive", HEX$( IDE.FileTabContolInactive))
      ini.write("HiLighting", STR$( IDE.HiLighting))
      ini.write("DefaultLexLanguage", STR$( IDE.DefaultLexLanguage))
      ini.write("LineNumbers", STR$( IDE.LineNumbers))
      ini.write("ActiveLineBack", STR$( IDE.ActiveLineBack))
      ini.write("UseTabs", STR$( IDE.UseTabs))
      ini.write("TabSpaces", STR$( IDE.TabSpaces))
      ini.write("CodePage", STR$( IDE.CodePage))
      ini.write("AutoIndent", STR$( IDE.AutoIndent))
      ini.write("CodeFolding", STR$( IDE.CodeFolding))
      ini.write("CodeFoldCollapseAll", STR$( IDE.CodeFoldCollapseAll))
      ini.write("CodeFoldExpandAll", STR$( IDE.CodeFoldExpandAll))
      ini.write("ViewIndents", STR$( IDE.ViewIndents))
      ini.write("WordWrap", STR$(IDE.WordWrap))

      ini.write("UseAppDirectory", STR$(IDE.UseAppDirectory))
      ini.write("ConstPath",   IDE.ConstPath)

      ini.write("FileFilter",   IDE.FileFilter)
      ini.write("CompilerPath",   IDE.CompilerPath)
      ini.write("CompilerLibPath",   IDE.CompilerLibPath)
      ini.write("CompilerIncPath",   IDE.CompilerIncPath)
      ini.write("CompilerIconPath",   IDE.CompilerIconPath)
      ini.write("CompilerHelpFile",   IDE.CompilerHelpFile)
      ini.write("CompilerTemplatePath",   IDE.CompilerTemplatePath)

      ini.write("FBCompilerPath",   IDE.FBCompilerPath)
      ini.write("FBCommandLIne",   IDE.FBCommandLIne)
      ini.write("FBCompilerHelpFile",   IDE.FBCompilerHelpFile)

      ini.write("IconName",   IDE.IconName)
      ini.write("OptimizeOn", STR$( IDE.OptimizeOn))
      ini.write("TypeCheckOn", STR$( IDE.TypeCheckOn))
      ini.write("VerboseOn", STR$( IDE.VerboseOn))
      ini.write("ByteCodeOn", STR$( IDE.ByteCodeOn))
      ini.write("GenerateManifest", STR$( IDE.GenerateManifest))

      ini.write("SaveFileBeforeCompile", STR$( IDE.SaveFileBeforeCompile))
      ini.write("SaveAllBeforeCompile", STR$( IDE.SaveAllBeforeCompile))
      ini.write("ScriptBeforeCompile", IDE.ScriptBeforeCompile)

    '--------------------Other options --------------------
      ini.write("SingleInstanceOnly", STR$(  IDE.SingleInstanceOnly))
      ini.write("SaveSettingsOnExit", STR$(  IDE.SaveSettingsOnExit))
      ini.write("ShowSubsAfterLoad", STR$(  IDE.ShowSubsAfterLoad))
      ini.write("SortSubs", STR$(  IDE.SortSubs))
      ini.write("HiLightCompileErr", STR$(  IDE.HiLightCompileErr))
      ini.write("BackupFiles", STR$(  IDE.BackupFiles))
      ini.write("BackupFilesExt",  IDE.BackupFilesExt)
      ini.write("HighlightBraces",  STR$(IDE.HighlightBraces))
      ini.write("AutoComplete",  STR$(IDE.AutoComplete))
      ini.write("NewTabAtStartup",  STR$(IDE.NewTabAtStartup))
      ini.write("NewFileName",  IDE.NewFileName)
      ini.write("NewFileAutoSave",  STR$(IDE.NewFileAutoSave))
      ini.write("AutoOpenLastProj",  STR$(IDE.AutoOpenLastProj))
      ini.write("ShowWelcome",  STR$(IDE.ShowWelcome))
      ini.write("MenuIcons",  STR$(IDE.MenuIcons))

      ini.write("AutoDeclClipboardActiveFile", STR$(  IDE.AutoDeclClipboardActiveFile))
      ini.write("AutoDeclClipboardAllFiles", STR$(  IDE.AutoDeclClipboardAllFiles))
      ini.write("AutoDeclAtTopActiveFile", STR$(  IDE.AutoDeclAtTopActiveFile))
      ini.write("AutoDeclAtTopAllFiles", STR$(  IDE.AutoDeclAtTopAllFiles))
      ini.write("AutoDeclInFile", STR$(  IDE.AutoDeclInFile))
      ini.write("AutoDeclInFileName", IDE.AutoDeclInFileName )

      ini.write("SearchEngine",   IDE.SearchEngine)
      ini.write("HomePage",   IDE.HomePage)

      ini.write("ExternalApp1",   IDE.ExternalApp1)
      ini.write("ExternalApp2",   IDE.ExternalApp2)
      ini.write("ExternalApp3",   IDE.ExternalApp3)
      ini.write("ExternalApp4",   IDE.ExternalApp4)

      ini.write("upx",   IDE.upx)
      ini.write("ResHacker",   IDE.ResHacker)
      ini.write("DecompressEXE", IDE.DecompressEXE)

    '.....resources......
    'these objects are not created on first initialization!!!
    'running this code without checking will cause GP Fault on first creation of .ini file
      IF ResetIt THEN
       IDE.EmbedManifest  =         IDE_Conf_ManifestEmbedCheckBox.Checked
       IDE.EmbedVersionInfo  =      IDE_Conf_VersionInfoCheckBox.Checked
       IDE.FileVersion   =          IDE_Conf_VersionInfoGrid.Cell(1,1)
       IDE.ProductVersion   =       IDE_Conf_VersionInfoGrid.Cell(1,2)
       IDE.CompanyName   =          IDE_Conf_VersionInfoGrid.Cell(1,6)
       IDE.CompanyEmail   =         IDE_Conf_VersionInfoGrid.Cell(1,7)
       IDE.FileDescription   =      IDE_Conf_VersionInfoGrid.Cell(1,8)
       IDE.LegalCopyright   =       IDE_Conf_VersionInfoGrid.Cell(1,11)
      END IF

      ini.write("EmbedManifest",   STR$( IDE.EmbedManifest) )
      ini.write("EmbedVersionInfo",   STR$( IDE.EmbedVersionInfo) )
      ini.write("FileVersion",   IDE.FileVersion)
      ini.write("ProductVersion",   IDE.ProductVersion)
      ini.write("CompanyName",   IDE.CompanyName)
      ini.write("CompanyEmail",   IDE.CompanyEmail)
      ini.write("FileDescription",   IDE.FileDescription)
      ini.write("LegalCopyright",   IDE.LegalCopyright)

    '.....menus......
      ini.write("MenuShortCutFile",   IDE.MenuShortCutFile)
      IF ResetIt THEN SetIDEVariables

     END SUB



     SUB ReadIDEVariables
      DIM TmpInt   AS INTEGER
      DIM TmpStr   AS STRING

      IF ini.Exist THEN
       ini.Section = "IDE_Variables"
       TmpInt = VAL(ini.GET("MainFormLeft", ""))               :    IDE.MainFormLeft = TmpInt
       TmpInt = VAL(ini.GET("MainFormTop", ""))                :    IDE.MainFormTop = TmpInt
       TmpInt = VAL(ini.GET("MainFormWidth", ""))              :    IDE.MainFormWidth = TmpInt
       TmpInt = VAL(ini.GET("MainFormHeight", ""))             :    IDE.MainFormHeight = TmpInt
       TmpInt = VAL(ini.GET("RightSplitterPos", STR$(IDE.MainFormWidth * 0.8))): IDE.RightSplitterPos = TmpInt
       TmpInt = VAL(ini.GET("LeftSplitterPos", "100"))         :    IDE.LeftSplitterPos = TmpInt

        'find replace form settings
       TmpInt = VAL(ini.GET("FindReplaceFormLeft", ""))
       IF (TmpInt > 0) AND (TmpInt < (Screen.Width - 300)) THEN FindReplaceForm.Left = TmpInt
       TmpInt = VAL(ini.GET("FindReplaceFormTop", ""))
       IF (TmpInt > 0) AND (TmpInt < (Screen.Height - 450)) THEN FindReplaceForm.Top = TmpInt
       TmpInt = VAL(ini.GET("SetFindTransparency", ""))        :   FindTransparencyOnLostFocusBox.Checked = TmpInt
       TmpInt = VAL(ini.GET("FindTransparencyValue", "255"))   :   FindReplaceTrackBar.Position = TmpInt

       TmpStr = TRIM$(ini.GET("FindReplaceItem0", "")) : IF TmpStr <> "" THEN ComboBoxFind.AddItems TmpStr
       TmpStr = TRIM$(ini.GET("FindReplaceItem1", "")) : IF TmpStr <> "" THEN ComboBoxFind.AddItems TmpStr
       TmpStr = TRIM$(ini.GET("FindReplaceItem2", "")) : IF TmpStr <> "" THEN ComboBoxFind.AddItems TmpStr
       TmpStr = TRIM$(ini.GET("FindReplaceItem3", "")) : IF TmpStr <> "" THEN ComboBoxFind.AddItems TmpStr
       TmpStr = TRIM$(ini.GET("FindReplaceItem4", "")) : IF TmpStr <> "" THEN ComboBoxFind.AddItems TmpStr
       TmpStr = TRIM$(ini.GET("FindReplaceItem5", "")) : IF TmpStr <> "" THEN ComboBoxFind.AddItems TmpStr
       TmpStr = TRIM$(ini.GET("FindReplaceItem6", "")) : IF TmpStr <> "" THEN ComboBoxFind.AddItems TmpStr
       TmpStr = TRIM$(ini.GET("FindReplaceItem7", "")) : IF TmpStr <> "" THEN ComboBoxFind.AddItems TmpStr
       TmpStr = TRIM$(ini.GET("FindReplaceItem8", "")) : IF TmpStr <> "" THEN ComboBoxFind.AddItems TmpStr
       TmpStr = TRIM$(ini.GET("FindReplaceItem9", "")) : IF TmpStr <> "" THEN ComboBoxFind.AddItems TmpStr


       TmpInt = VAL(ini.GET("ViewStatusBar", "null"))   :    IDE.ViewStatusBar = TmpInt
       TmpInt = VAL(ini.GET("ViewQuickSearch", "null"))   :    IDE.ViewQuickSearch = TmpInt
       TmpInt = VAL(ini.GET("ViewLeftPanel", "null"))   :    IDE.ViewLeftPanel = TmpInt
       TmpInt = VAL(ini.GET("ViewRightPanel", "null"))   :    IDE.ViewRightPanel = TmpInt
       TmpInt = VAL(ini.GET("ViewBottomPanel", "null"))   :    IDE.ViewBottomPanel = TmpInt
       TmpInt = VAL(ini.GET("ViewTopPanel", "null"))   :    IDE.ViewTopPanel = TmpInt
       TmpInt = VAL(ini.GET("ViewFileToolPanel", "null"))   :    IDE.ViewFileToolPanel = TmpInt
       TmpInt = VAL(ini.GET("ViewEditToolPanel", "null"))   :    IDE.ViewEditToolPanel = TmpInt
       TmpInt = VAL(ini.GET("ViewCompileToolPanel", "null"))   :    IDE.ViewCompileToolPanel = TmpInt
       TmpInt = VAL(ini.GET("ViewViewToolPanel", "null"))   :    IDE.ViewViewToolPanel = TmpInt
       TmpInt = VAL(ini.GET("ViewCodeFoldingToolPanel", "null"))   :    IDE.ViewCodeFoldingToolPanel = TmpInt
       TmpInt = VAL(ini.GET("ViewFormatToolPanel", "null"))   :    IDE.ViewFormatToolPanel = TmpInt
       TmpInt = VAL(ini.GET("ViewBookMarkToolPanel", "null"))   :    IDE.ViewBookMarkToolPanel = TmpInt
       TmpInt = VAL(ini.GET("ViewIconToolPanel", "null"))   :    IDE.ViewIconToolPanel = TmpInt
       TmpInt = VAL(ini.GET("ViewWidgetToolPanel", "null"))   :    IDE.ViewWidgetToolPanel = TmpInt

       TmpStr = ini.GET("MainFont.Name", "")   : IDE.MainFont.Name= TmpStr
       TmpInt = VAL(ini.GET("MainFont.Size", ""))   : IDE.MainFont.Size = TmpInt
       TmpInt = HexToDec(ini.GET("MainFont.Color", ""))   : IDE.MainFont.COLOR= TmpInt
       TmpInt = VAL(ini.GET("MainFont.Bold", ""))   : IDE.MainFont.Bold= TmpInt
       TmpInt = VAL(ini.GET("MainFont.Italic", ""))   : IDE.MainFont.Italic= TmpInt
       TmpInt = VAL(ini.GET("MainFont.Underline", ""))   : IDE.MainFont.Underline= TmpInt

       TmpInt = HexToDec(ini.GET("BackGround", ""))   :    IDE.BackGround = TmpInt
       TmpInt = HexToDec(ini.GET("SelectionFore", ""))   :    IDE.SelectionFore = TmpInt
       TmpInt = HexToDec(ini.GET("SelectionBack", ""))   :    IDE.SelectionBack = TmpInt
       TmpInt = HexToDec(ini.GET("LineNumbersFore", ""))   :    IDE.LineNumbersFore = TmpInt
       TmpInt = HexToDec(ini.GET("LineNumbersBack", ""))   :    IDE.LineNumbersBack = TmpInt
       TmpInt = HexToDec(ini.GET("CommentFore", ""))   :    IDE.CommentFore = TmpInt
       TmpInt = HexToDec(ini.GET("CommentBack", ""))   :    IDE.CommentBack = TmpInt
       TmpInt = VAL(ini.GET("CommentBold", ""))   :    IDE.CommentBold = TmpInt
       TmpInt = VAL(ini.GET("CommentItalic", ""))   :    IDE.CommentItalic = TmpInt
       TmpInt = VAL(ini.GET("CommentUnderL", ""))   :    IDE.CommentUnderL = TmpInt
       TmpInt = HexToDec(ini.GET("NumberFore", ""))   :    IDE.NumberFore = TmpInt
       TmpInt = HexToDec(ini.GET("NumberBack", ""))   :    IDE.NumberBack = TmpInt
       TmpInt = VAL(ini.GET("NumberBold", ""))   :    IDE.NumberBold = TmpInt
       TmpInt = VAL(ini.GET("NumberItalic", ""))   :    IDE.NumberItalic = TmpInt
       TmpInt = VAL(ini.GET("NumberUnderL", ""))   :    IDE.NumberUnderL = TmpInt
       TmpInt = HexToDec(ini.GET("StringFore", ""))   :    IDE.StringFore = TmpInt
       TmpInt = HexToDec(ini.GET("StringBack", ""))   :    IDE.StringBack = TmpInt
       TmpInt = VAL(ini.GET("StringBold", ""))   :    IDE.StringBold = TmpInt
       TmpInt = VAL(ini.GET("StringItalic", ""))   :    IDE.StringItalic = TmpInt
       TmpInt = VAL(ini.GET("StringUnderL", ""))   :    IDE.StringUnderL = TmpInt
       TmpInt = HexToDec(ini.GET("PreProcessorFore", ""))   :    IDE.PreProcessorFore = TmpInt
       TmpInt = HexToDec(ini.GET("PreProcessorBack", ""))   :    IDE.PreProcessorBack = TmpInt
       TmpInt = VAL(ini.GET("PreProcessorBold", ""))   :    IDE.PreProcessorBold = TmpInt
       TmpInt = VAL(ini.GET("PreProcessorItalic", ""))   :    IDE.PreProcessorItalic = TmpInt
       TmpInt = VAL(ini.GET("PreProcessorUnderL", ""))   :    IDE.PreProcessorUnderL = TmpInt
       TmpInt = HexToDec(ini.GET("OperatorFore", ""))   :    IDE.OperatorFore = TmpInt
       TmpInt = HexToDec(ini.GET("OperatorBack", ""))   :    IDE.OperatorBack = TmpInt
       TmpInt = VAL(ini.GET("OperatorBold", ""))   :    IDE.OperatorBold = TmpInt
       TmpInt = VAL(ini.GET("OperatorItalic", ""))   :    IDE.OperatorItalic = TmpInt
       TmpInt = VAL(ini.GET("OperatorUnderL", ""))   :    IDE.OperatorUnderL = TmpInt
       TmpInt = HexToDec(ini.GET("KeywordFore", ""))   :    IDE.KeywordFore = TmpInt
       TmpInt = HexToDec(ini.GET("KeywordBack", ""))   :    IDE.KeywordBack = TmpInt
       TmpInt = VAL(ini.GET("KeywordBold", ""))   :    IDE.KeywordBold = TmpInt
       TmpInt = VAL(ini.GET("KeywordItalic", ""))   :    IDE.KeywordItalic = TmpInt
       TmpInt = VAL(ini.GET("KeywordUnderL", ""))   :    IDE.KeywordUnderL = TmpInt
       TmpInt = HexToDec(ini.GET("Keyword2Fore", ""))   :    IDE.Keyword2Fore = TmpInt
       TmpInt = HexToDec(ini.GET("Keyword2Back", ""))   :    IDE.Keyword2Back = TmpInt
       TmpInt = VAL(ini.GET("Keyword2Bold", ""))   :    IDE.Keyword2Bold = TmpInt
       TmpInt = VAL(ini.GET("Keyword2Italic", ""))   :    IDE.Keyword2Italic = TmpInt
       TmpInt = VAL(ini.GET("Keyword2UnderL", ""))   :    IDE.Keyword2UnderL = TmpInt
       TmpInt = HexToDec(ini.GET("Keyword3Fore", ""))   :    IDE.Keyword3Fore = TmpInt
       TmpInt = HexToDec(ini.GET("Keyword3Back", ""))   :    IDE.Keyword3Back = TmpInt
       TmpInt = VAL(ini.GET("Keyword3Bold", ""))   :    IDE.Keyword3Bold = TmpInt
       TmpInt = VAL(ini.GET("Keyword3Italic", ""))   :    IDE.Keyword3Italic = TmpInt
       TmpInt = VAL(ini.GET("Keyword3UnderL", ""))   :    IDE.Keyword3UnderL = TmpInt
       TmpInt = HexToDec(ini.GET("FileTabContolBack", ""))   :    IDE.FileTabContolBack = TmpInt
       TmpInt = HexToDec(ini.GET("FileTabContolInactive", ""))   :    IDE.FileTabContolInactive = TmpInt
       TmpInt = VAL(ini.GET("HiLighting", ""))   :    IDE.HiLighting = TmpInt
       TmpInt = VAL(ini.GET("DefaultLexLanguage", "8"))   :    IDE.DefaultLexLanguage = TmpInt
       TmpInt = VAL(ini.GET("LineNumbers", ""))   :    IDE.LineNumbers = TmpInt
       TmpInt = VAL(ini.GET("ActiveLineBack", "-1"))   :    IDE.ActiveLineBack = TmpInt

       TmpInt = VAL(ini.GET("UseTabs", ""))   :    IDE.UseTabs = TmpInt
       TmpInt = VAL(ini.GET("TabSpaces", ""))   :    IDE.TabSpaces = TmpInt
       TmpInt = VAL(ini.GET("CodePage", ""))   :    IDE.CodePage = TmpInt
       TmpInt = VAL(ini.GET("AutoIndent", ""))   :    IDE.AutoIndent = TmpInt
       TmpInt = VAL(ini.GET("CodeFolding", ""))   :    IDE.CodeFolding = TmpInt
       TmpInt = VAL(ini.GET("CodeFoldCollapseAll", ""))   :    IDE.CodeFoldCollapseAll = TmpInt
       TmpInt = VAL(ini.GET("CodeFoldExpandAll", ""))   :    IDE.CodeFoldExpandAll = TmpInt
       TmpInt = VAL(ini.GET("ViewIndents", ""))   :    IDE.ViewIndents = TmpInt
       TmpInt = VAL(ini.GET("WordWrap", ""))   :    IDE.WordWrap = TmpInt

       TmpInt = VAL(ini.GET("UseAppDirectory", "1"))   :    IDE.UseAppDirectory = TmpInt
       TmpStr = ini.GET("ConstPath", "")   :    IDE.ConstPath = TmpStr

       TmpStr = ini.GET("FileFilter", "")   :    IDE.FileFilter = TmpStr
       TmpStr = ini.GET("CompilerPath", "")   :    IDE.CompilerPath = TmpStr
       TmpStr = ini.GET("CompilerLibPath", "")   :    IDE.CompilerLibPath = TmpStr
       TmpStr = ini.GET("CompilerIncPath", "")   :    IDE.CompilerIncPath = TmpStr
       TmpStr = ini.GET("CompilerIconPath", "")   :    IDE.CompilerIconPath = TmpStr
       TmpStr = ini.GET("CompilerHelpFile", "")   :    IDE.CompilerHelpFile = TmpStr
       TmpStr = ini.GET("CompilerTemplatePath", "")   :    IDE.CompilerTemplatePath = TmpStr

       TmpStr = ini.GET("FBCompilerPath", "")   :    IDE.FBCompilerPath = TmpStr
       TmpStr = ini.GET("FBCommandLIne", "")   :    IDE.FBCommandLIne = TmpStr
       TmpStr = ini.GET("FBCompilerHelpFile", "")   :    IDE.FBCompilerHelpFile = TmpStr

       TmpStr = ini.GET("IconName", "")   :    IDE.IconName = TRIM$(TmpStr)

       TmpStr = ini.GET("FBCompilerPath", "")   :    IDE.FBCompilerPath = TmpStr
       TmpStr = ini.GET("FBCommandLine", "")   :    IDE.FBCommandLine = TmpStr
       TmpStr = ini.GET("FBCompilerHelpFile", "")   :    IDE.FBCompilerHelpFile = TmpStr

       TmpInt = VAL(ini.GET("OptimizeOn", ""))   :    IDE.OptimizeOn = TmpInt
       TmpInt = VAL(ini.GET("TypeCheckOn", ""))   :    IDE.TypeCheckOn = TmpInt
       TmpInt = VAL(ini.GET("VerboseOn", ""))   :    IDE.VerboseOn = TmpInt
       TmpInt = VAL(ini.GET("ByteCodeOn", ""))   :    IDE.ByteCodeOn = TmpInt

       TmpInt = VAL(ini.GET("GenerateManifest", ""))   :    IDE.GenerateManifest = TmpInt
       TmpInt = VAL(ini.GET("SaveFileBeforeCompile", ""))   :    IDE.SaveFileBeforeCompile = TmpInt
       TmpInt = VAL(ini.GET("SaveAllBeforeCompile", ""))   :    IDE.SaveAllBeforeCompile = TmpInt
       TmpStr = ini.GET("ScriptBeforeCompile", "")   :    IDE.ScriptBeforeCompile = TmpStr

       TmpInt = VAL(ini.GET("SingleInstanceOnly", ""))   :    IDE.SingleInstanceOnly = TmpInt
       TmpInt = VAL(ini.GET("ShowSplashScreen", ""))   :    IDE.ShowSplashScreen = TmpInt
       TmpInt = VAL(ini.GET("SaveSettingsOnExit", ""))   :    IDE.SaveSettingsOnExit = TmpInt
       TmpInt = VAL(ini.GET("ShowSubsAfterLoad", ""))   :    IDE.ShowSubsAfterLoad = TmpInt
       TmpInt = VAL(ini.GET("SortSubs", ""))   :    IDE.SortSubs = TmpInt
       TmpInt = VAL(ini.GET("HiLightCompileErr", ""))   :    IDE.HiLightCompileErr = TmpInt
       TmpInt = VAL(ini.GET("BackupFiles", ""))   :    IDE.BackupFiles = TmpInt
       TmpStr = ini.GET("BackupFilesExt", "")   :    IDE.BackupFilesExt = TmpStr
       TmpInt = VAL(ini.GET("HighlightBraces", ""))   :    IDE.HighlightBraces = TmpInt
       TmpInt = VAL(ini.GET("AutoComplete", ""))   :    IDE.AutoComplete = TmpInt
       TmpInt = VAL(ini.GET("NewTabAtStartup", ""))   :    IDE.NewTabAtStartup = TmpInt
       TmpInt = VAL(ini.GET("AutoOpenLastProj", ""))   :    IDE.AutoOpenLastProj = TmpInt
       TmpInt = VAL(ini.GET("ShowWelcome", ""))        :    IDE.ShowWelcome = TmpInt
       TmpStr = VAL(ini.GET("NewFileName", "~New"))   :    IDE.NewFileName = TmpStr
       TmpInt = VAL(ini.GET("NewFileAutoSave", ""))   :    IDE.NewFileAutoSave = TmpInt
       TmpInt = VAL(ini.GET("MenuIcons", ""))   :    IDE.MenuIcons = TmpInt

       TmpInt = VAL(ini.GET("AutoDeclClipboardActiveFile", ""))   :    IDE.AutoDeclClipboardActiveFile = TmpInt
       TmpInt = VAL(ini.GET("AutoDeclClipboardAllFiles", ""))   :    IDE.AutoDeclClipboardAllFiles = TmpInt
       TmpInt = VAL(ini.GET("AutoDeclAtTopActiveFile", ""))   :    IDE.AutoDeclAtTopActiveFile = TmpInt
       TmpInt = VAL(ini.GET("AutoDeclAtTopAllFiles", ""))   :    IDE.AutoDeclAtTopAllFiles = TmpInt
       TmpInt = VAL(ini.GET("AutoDeclInFile", ""))   :    IDE.AutoDeclInFile = TmpInt
       TmpStr = ini.GET("AutoDeclInFileName", "")   :    IDE.AutoDeclInFileName = TmpStr

       TmpStr = ini.GET("SearchEngine", "")   :    IDE.SearchEngine = TmpStr
       TmpStr = ini.GET("HomePage", "")   :    IDE.HomePage = TmpStr

       TmpStr = ini.GET("ExternalApp1", "")   :    IDE.ExternalApp1 = TmpStr
       TmpStr = ini.GET("ExternalApp2", "")   :    IDE.ExternalApp2 = TmpStr
       TmpStr = ini.GET("ExternalApp3", "")   :    IDE.ExternalApp3 = TmpStr
       TmpStr = ini.GET("ExternalApp4", "")   :    IDE.ExternalApp4 = TmpStr

       TmpStr = ini.GET("upx", "")
'        TmpStr = REPLACESUBSTR$(TmpStr, "%APPPATH%", Application.Path)          ''allow for "%APPPATH% = Path of FreeQ exe"
       IDE.upx = TmpStr
       TmpStr = ini.GET("ResHacker", "")
'        TmpStr = REPLACESUBSTR$(TmpStr, "%APPPATH%", Application.Path)
       IDE.ResHacker = TmpStr
       TmpInt = VAL(ini.GET("DecompressEXE", "0"))       :    IDE.DecompressEXE = TmpInt


       TmpInt = VAL(ini.GET("EmbedManifest", "0"))       :    IDE.EmbedManifest = TmpInt
       TmpInt = VAL(ini.GET("EmbedVersionInfo", "0"))   :    IDE.EmbedVersionInfo = TmpInt
       TmpStr = ini.GET("FileVersion", "1,0,0,0")   :    IDE.FileVersion = TmpStr
       TmpStr = ini.GET("ProductVersion", "1,0,0,0")   :    IDE.ProductVersion = TmpStr
       TmpStr = ini.GET("CompanyName", "My Company")   :    IDE.CompanyName = TmpStr
       TmpStr = ini.GET("CompanyEmail", "me@Company.com")   :    IDE.CompanyEmail = TmpStr
       TmpStr = ini.GET("FileDescription", "program developed in FreeQ")   :    IDE.FileDescription = TmpStr
       TmpStr = ini.GET("LegalCopyright", "Copyright 2009, my company")   :    IDE.LegalCopyright = TmpStr

       SetIDEVariables
       IF ini.FileName = TheMainIniFile THEN IDE_GetRecentList     'only on the main ini for the editor!
'       IDE_Conf_LoadProject            're open last project
      END IF
      IDE_Conf_Form.CLOSE
     END SUB



     SUB SetIDEVariables
      DEFINT nX = IDE.MainFormLeft                    'need to store Mainform sizes so
      DEFINT nY = IDE.MainFormTop                     'not to interfere with OnResize!!
      DEFINT nX2 = IDE.MainFormWidth
      DEFINT nY2 = IDE.MainFormHeight

      IF (nX2 = 0) OR (nY2 = 0) THEN                  'have new ini file...
       nX = 48
       nX2 = Screen.ClientWidth - 96
       nY = 48
       nY2 = Screen.ClientHeight - 96
       IDE.RightSplitterPos = nX2 * 0.8        '80%
       IDE.LeftSplitterPos = nX2 * 0.2         '20%

      ELSE                                            'else set limits
       IF nX < -6 THEN nX = 0                           'set limits on top & left
       IF nY < -6 THEN nY = 0
       IF (nX2 + nX) > (Screen_Width + 8) THEN     'allow some slop
        nX2 = Screen.ClientWidth - 48 - nX
       END IF
       IF nX2 < 500 THEN nX2 = 500

       IF (nY2 + nY) > (Screen_Width + 4) THEN
        nY2 = Screen.ClientHeight - 48 - nY
       END IF
       IF nY2 < 400 THEN nY2 = 400
      END IF

      MainForm.Left = nX                              'setting MainForm Size will set
      MainForm.Top = nY                               'global IDE.MainformXXXX vars, no need to set here
      MainForm.Width = nX2
      MainForm.Height = nY2




      Splitter_Moved
      IF IDE.RightSplitterPos < 300 THEN IDE.RightSplitterPos = 300
      IF IDE.RightSplitterPos > (MainForm.ClientWidth - 40) THEN IDE.RightSplitterPos = (MainForm.ClientWidth - 40)
      RightPanel.Width = MainForm.ClientWidth - IDE.RightSplitterPos - RightSplitter.Width
      IF IDE.LeftSplitterPos < 10 THEN IDE.LeftSplitterPos = 10
      IF IDE.LeftSplitterPos > 50 THEN LeftPanel.Width = IDE.LeftSplitterPos
      Splitter_Moved


      MFE_Tab.COLOR = IDE.FileTabContolBack
      MFE_Tab.TabInactiveColor = IDE.FileTabContolInactive
      re.SetStyle(STYLE_LINENUMBER, IDE.LineNumbersFore, IDE.LineNumbersBack, 0,0,0)

    'set main editor options (no menu operations)
      re.Set_TabWidth(IDE.TabSpaces)
      re.Set_WantTabs(IDE.UseTabs)
      re.Set_CodePage(IDE.CodePage)
      re.Set_Font(IDE.MainFont)
      re.Set_SelColor(IDE.SelectionFore, IDE.SelectionBack)
      IF IDE.ActiveLineBack <> -1 THEN re.ActiveLineColor(IDE.ActiveLineBack, 0) ELSE re.ActiveLineColor(IDE.BackGround, 0)
      re.HighlightBraces = IDE.HighlightBraces
      IF IDE.HighlightBraces THEN
       re.SetStyle(STYLE_BRACEBAD, IDE.BackGround, IDE.MainFont.COLOR, 1,1,0)
       re.SetStyle(STYLE_BRACELIGHT, IDE.MainFont.COLOR, IDE.BackGround, 1,0,0)
      END IF

    'set these options though menus, need to have check marks set correctly
      IDE.ViewStatusBar =   NOT!(IDE.ViewStatusBar)                       :   mnuViewStatusBar_Click
      IDE.ViewQuickSearch = NOT!(IDE.ViewQuickSearch)                     :   VisibileQuickSearchClick
      IDE.ViewStatusBar =   NOT!(IDE.ViewStatusBar)                       :   mnuViewStatusBar_Click
      IDE.ViewLeftPanel =   NOT!(IDE.ViewLeftPanel)                       :   mnuViewLeftPanel_Click
      IDE.ViewRightPanel =   NOT!(IDE.ViewRightPanel)                     :   mnuViewRightPanel_Click
      IDE.ViewBottomPanel =   NOT!(IDE.ViewBottomPanel)                   :   mnuViewBottomPanel_Click
      IDE.ViewTopPanel =   NOT!(IDE.ViewTopPanel)                         :   mnuViewTopPanel_Click
      IDE.ViewFileToolPanel =   NOT!(IDE.ViewFileToolPanel)               :   mnuViewFileToolBar_Click
      IDE.ViewEditToolPanel =   NOT!(IDE.ViewEditToolPanel)               :   mnuViewEditToolBar_Click
      IDE.ViewCompileToolPanel =   NOT!(IDE.ViewCompileToolPanel)         :   mnuViewCompileToolBar_Click
      IDE.ViewViewToolPanel =   NOT!(IDE.ViewViewToolPanel)               :   mnuViewViewToolBar_Click
      IDE.ViewCodeFoldingToolPanel =   NOT!(IDE.ViewCodeFoldingToolPanel) :   mnuViewCodeFoldToolBar_Click
      IDE.ViewFormatToolPanel =   NOT!(IDE.ViewFormatToolPanel)           :   mnuViewFormatToolBar_Click
      IDE.ViewBookMarkToolPanel =   NOT!(IDE.ViewBookMarkToolPanel)       :   mnuViewBookMarkToolBar_Click
      IDE.ViewIconToolPanel = NOT!(IDE.ViewIconToolPanel)                 :   mnuViewIconToolBar_Click
      IDE.ViewWidgetToolPanel = NOT!( IDE.ViewWidgetToolPanel)            :   mnuViewWidgetToolBar_Click

      IDE.CodeFolding = NOT!(IDE.CodeFolding)                     : Mnu_CodeFolding_Click
      IDE.CodeFoldCollapseAll = NOT!(IDE.CodeFoldCollapseAll)     : Mnu_CodeFoldingCollapseAll_Click
      IDE.CodeFoldExpandAll = NOT!(IDE.CodeFoldExpandAll)         : Mnu_CodeFoldingExpandAll_Click

    'toggle setup through menus
      IDE.HiLighting =   NOT!( IDE.HiLighting) :         Mnu_HilightClick
      IDE.WordWrap =     NOT!( IDE.WordWrap) :           Mnu_WordWrapClick
      IDE.LineNumbers =  NOT!( IDE.LineNumbers) :        Mnu_SetLineNumbersClick
      IDE.AutoIndent =   NOT!( IDE.AutoIndent) :         Mnu_AutoIndentClick
      IDE.AutoComplete = NOT!( IDE.AutoComplete) :       Mnu_AutoCompleteClick
      IDE.CodeFolding =  NOT!( IDE.CodeFolding) :        Mnu_CodeFolding_Click
      IDE.ViewIndents =  NOT!( IDE.ViewIndents) :        Mnu_ViewIndentationClick
      IDE.ViewBookMarks = NOT!(IDE.ViewBookMarks) :      mnuNViewBookMark_Click

      FOR nX = 0 TO IDE_Conf_MainLanguage.ItemCount-1
       nY = VAL(RIGHT$(IDE_Conf_MainLanguage.Item(nX), 4))
       IF IDE.DefaultLexLanguage = nY THEN
        IDE_Conf_MainLanguage.ItemIndex = nX
        mnuSetAsDefaultCompileFile.CAPTION = "Set this File as " _
         + LEFT$(IDE_Conf_MainLanguage.Text, INSTR(IDE_Conf_MainLanguage.Text, "   ") + 1) + "file"
        EXIT FOR
       END IF
      NEXT nx

      IF IDE.ExternalApp1 <> "" THEN
       mnuExternalApp1.Visible = True:        mnuExternalApp1.CAPTION = IDE.ExternalApp1
      ELSE
       mnuExternalApp1.Visible = False:       mnuExternalApp1.CAPTION = ""
      END IF
      IF IDE.ExternalApp2 <> "" THEN
       mnuExternalApp2.Visible = True:        mnuExternalApp2.CAPTION = IDE.ExternalApp2
      ELSE
       mnuExternalApp2.Visible = False:       mnuExternalApp2.CAPTION = ""
      END IF
      IF IDE.ExternalApp3 <> "" THEN
       mnuExternalApp3.Visible = True:        mnuExternalApp3.CAPTION = IDE.ExternalApp3
      ELSE
       mnuExternalApp3.Visible = False:       mnuExternalApp3.CAPTION = ""
      END IF
      IF IDE.ExternalApp4 <> "" THEN
       mnuExternalApp4.Visible = True:        mnuExternalApp4.CAPTION = IDE.ExternalApp4
      ELSE
       mnuExternalApp4.Visible = False:       mnuExternalApp4.CAPTION = ""
      END IF

      IF IDE.IconName = "" THEN          'setting to null makes default RQ icon
       IconsetFlatButton.ICOHandle = RapidQ_ico
      ELSE
       IconsetFlatButton.Icon = IDE.IconName
      END IF

      IDE_Conf_ManifestEmbedCheckBox.Checked = IDE.EmbedManifest
      IDE_Conf_VersionInfoCheckBox.Checked = IDE.EmbedVersionInfo
      IDE_Conf_VersionInfoGrid.Cell(1,1)  = IDE.FileVersion
      IDE_Conf_VersionInfoGrid.Cell(1,2) = IDE.ProductVersion
      IDE_Conf_VersionInfoGrid.Cell(1,6) = IDE.CompanyName
      IDE_Conf_VersionInfoGrid.Cell(1,7) = IDE.CompanyEmail
      IDE_Conf_VersionInfoGrid.Cell(1,8) = IDE.FileDescription
      IDE_Conf_VersionInfoGrid.Cell(1,11) = IDE.LegalCopyright


      IF IDE.KeyWordList.ItemCount > 0 THEN re.LoadKeywordList(0, IDE.KeyWordList)   ': IDE.KeyWordList.Clear
      IF IDE.KeyWordList2.ItemCount > 0 THEN re.LoadKeywordList(1, IDE.KeyWordList2)   ': IDE.KeyWordList2.Clear
      IF IDE.KeyWordList3.ItemCount > 0 THEN re.LoadKeywordList(2, IDE.KeyWordList3)   ': IDE.KeyWordList3.Clear
     END SUB



     SUB IDE_Conf_ToggleActiveLineColor
      IF IDE_Conf_ActiveLineBackButton.Checked THEN
       IF IDE.ActiveLineBack = -1 THEN                             '-1 = turn off, else give default
        IDE_Conf_ActiveLineBackLabel.COLOR = RGB(255, 243, 200)
       ELSE
        IDE_Conf_ActiveLineBackLabel.COLOR = IDE.ActiveLineBack
       END IF
       IDE_Conf_ActiveLineBackLabel.Visible = True
      ELSE
       IDE.ActiveLineBack = -1
       IDE_Conf_ActiveLineBackLabel.COLOR = IDE.ActiveLineBack
       IDE_Conf_ActiveLineBackLabel.Visible = False
      END IF
      re.ActiveLineColor(IDE.ActiveLineBack, 0)
     END SUB





     SUB IDE_Conf_TextRichEditKeyDown(Key AS WORD, Shift AS INTEGER)
      IDE_Conf_Form_Refresh
     END SUB

     SUB IDE_Conf_TextRichEditMouseDown(Button%, X%, Y%, Shift%)
      IDE_Conf_Form_Refresh
     END SUB

     SUB IDE_Conf_PickFont
      FontDialog.GetFont(IDE.MainFont)
      IF FontDialog.EXECUTE THEN
       FontDialog.SetFont(IDE.MainFont)
       IDE_Conf_TextRichEdit.Font = IDE.MainFont
      END IF
     END SUB



     SUB IDE_UpdateRecentList
      DEFINT i = IDE_RecentFileList.IndexOf(IDE.MFEActiveFile)
      IF (i > = 0) AND (IDE_RecentFileList.ItemCount > 0) THEN IDE_RecentFileList.DelItems(i)
      IDE_RecentFileList.InsertItem(0, IDE.MFEActiveFile)                                                             'insert at beginning
      IF IDE_RecentFileList.ItemCount > (IDE_MAX_RECENTFILES + 1) THEN IDE_RecentFileList.DelItems(IDE_MAX_RECENTFILES +1)      'remove last if overflow

      ini.FileName = TheMainIniFile
      ini.Section = "Recent Files"
      FOR i = 0 TO IDE_MAX_RECENTFILES
       IF i < (IDE_RecentFileList.ItemCount) THEN
        ini.write("File" + STR$(i), IDE_RecentFileList.Item(i))
        SELECT CASE i
        CASE 0: mnuRecent0.Visible = True:  mnuRecent0.CAPTION = "&0 " + IDE_RecentFileList.Item(i)
        CASE 1: mnuRecent1.Visible = True:  mnuRecent1.CAPTION = "&1 " + IDE_RecentFileList.Item(i)
        CASE 2: mnuRecent2.Visible = True:  mnuRecent2.CAPTION = "&2 " + IDE_RecentFileList.Item(i)
        CASE 3: mnuRecent3.Visible = True:  mnuRecent3.CAPTION = "&3 " + IDE_RecentFileList.Item(i)
        CASE 4: mnuRecent4.Visible = True:  mnuRecent4.CAPTION = "&4 " + IDE_RecentFileList.Item(i)
        CASE 5: mnuRecent5.Visible = True:  mnuRecent5.CAPTION = "&5 " + IDE_RecentFileList.Item(i)
        CASE 6: mnuRecent6.Visible = True:  mnuRecent6.CAPTION = "&6 " + IDE_RecentFileList.Item(i)
        CASE 7: mnuRecent7.Visible = True:  mnuRecent7.CAPTION = "&7 " + IDE_RecentFileList.Item(i)
        CASE 8: mnuRecent8.Visible = True:  mnuRecent8.CAPTION = "&8 " + IDE_RecentFileList.Item(i)
        CASE 9: mnuRecent9.Visible = True:  mnuRecent9.CAPTION = "&9 " + IDE_RecentFileList.Item(i)
        CASE 10: mnuRecent10.Visible = True:  mnuRecent10.CAPTION = "&A " + IDE_RecentFileList.Item(i)
        CASE 11: mnuRecent11.Visible = True:  mnuRecent11.CAPTION = "&B " + IDE_RecentFileList.Item(i)
        CASE 12: mnuRecent12.Visible = True:  mnuRecent12.CAPTION = "&C " + IDE_RecentFileList.Item(i)
        CASE 13: mnuRecent13.Visible = True:  mnuRecent13.CAPTION = "&D " + IDE_RecentFileList.Item(i)
        CASE 14: mnuRecent14.Visible = True:  mnuRecent14.CAPTION = "&E " + IDE_RecentFileList.Item(i)
        CASE 15: mnuRecent15.Visible = True:  mnuRecent15.CAPTION = "&F " + IDE_RecentFileList.Item(i)
        END SELECT
       END IF
      NEXT i
     END SUB




     SUB IDE_GetRecentList
      DEFSTR tmpStr = ""
      DEFINT i

      IDE_RecentFileList.Clear
      ini.Section = "Recent Files"
      FOR i = 0 TO IDE_MAX_RECENTFILES -1
       TmpStr = ini.GET("File" + STR$(i), "")
       IF TmpStr <> "" THEN
        IDE_RecentFileList.AddItems TmpStr
        SELECT CASE i
        CASE 0: mnuRecent0.Visible = True:  mnuRecent0.CAPTION = "&0 " + TmpStr
        CASE 1: mnuRecent1.Visible = True:  mnuRecent1.CAPTION = "&1 " + TmpStr
        CASE 2: mnuRecent2.Visible = True:  mnuRecent2.CAPTION = "&2 " + TmpStr
        CASE 3: mnuRecent3.Visible = True:  mnuRecent3.CAPTION = "&3 " + TmpStr
        CASE 4: mnuRecent4.Visible = True:  mnuRecent4.CAPTION = "&4 " + TmpStr
        CASE 5: mnuRecent5.Visible = True:  mnuRecent5.CAPTION = "&5 " + TmpStr
        CASE 6: mnuRecent6.Visible = True:  mnuRecent6.CAPTION = "&6 " + TmpStr
        CASE 7: mnuRecent7.Visible = True:  mnuRecent7.CAPTION = "&7 " + TmpStr
        CASE 8: mnuRecent8.Visible = True:  mnuRecent8.CAPTION = "&8 " + TmpStr
        CASE 9: mnuRecent9.Visible = True:  mnuRecent9.CAPTION = "&9 " + TmpStr
        CASE 10: mnuRecent10.Visible = True:  mnuRecent10.CAPTION = "&A " + TmpStr
        CASE 11: mnuRecent11.Visible = True:  mnuRecent11.CAPTION = "&B " + TmpStr
        CASE 12: mnuRecent12.Visible = True:  mnuRecent12.CAPTION = "&C " + TmpStr
        CASE 13: mnuRecent13.Visible = True:  mnuRecent13.CAPTION = "&D " + TmpStr
        CASE 14: mnuRecent14.Visible = True:  mnuRecent14.CAPTION = "&E " + TmpStr
        CASE 15: mnuRecent15.Visible = True:  mnuRecent15.CAPTION = "&F " + TmpStr
        END SELECT
       END IF
      NEXT i

      ini.Section = "RecentProjects"
      TmpStr = ini.GET("File0", ""): mnuRecentProj0.CAPTION = TmpStr: IF TRIM$(mnuRecentProj0.CAPTION) = "" THEN mnuRecentProj0.Visible = False ELSE mnuRecentProj0.Visible = True
      TmpStr = ini.GET("File1", ""): mnuRecentProj1.CAPTION = TmpStr: IF TRIM$(mnuRecentProj1.CAPTION) = "" THEN mnuRecentProj1.Visible = False ELSE mnuRecentProj1.Visible = True
      TmpStr = ini.GET("File2", ""): mnuRecentProj2.CAPTION = TmpStr: IF TRIM$(mnuRecentProj2.CAPTION) = "" THEN mnuRecentProj2.Visible = False ELSE mnuRecentProj2.Visible = True
     END SUB


     SUB IDE_Conf_FindPathTarget (Sender AS QBUTTON)
      DEFSTR TheCurDir = DirTree.Directory    'allow to restore current state

      IF (Sender.Tag = 1) OR _
       (Sender.Tag = 6) OR _
       (Sender.Tag = 10) OR _
       (Sender.Tag = 16) OR _
       (Sender.Tag = 21) OR _
       (Sender.Tag = 22) OR _
       (Sender.Tag = 23) OR _
       (Sender.Tag = 24) OR _
       (Sender.Tag = 30) OR _
       (Sender.Tag = 31) THEN        'compiler path, or 'help file, FB = same +10, or find external app

       DIM OpenDialog AS QOPENDIALOG
       OpenDialog.InitialDir = Application.Path
       IF OpenDialog.EXECUTE THEN

        IF Sender.Tag = 1 THEN
         IDE.CompilerPath = OpenDialog.FileName
         IDE_Conf_Form_Refresh
        END IF

        IF Sender.Tag = 6 THEN IDE.CompilerHelpFile = OpenDialog.FileName               :IDE_Conf_Form_Refresh
        IF Sender.Tag = 10 THEN IDE.FBCompilerPath = OpenDialog.FileName                :IDE_Conf_Form_Refresh
        IF Sender.Tag = 16 THEN IDE.FBCompilerHelpFile = OpenDialog.FileName            :IDE_Conf_Form_Refresh
        IF Sender.Tag = 21 THEN IDE.ExternalApp1 = OpenDialog.FileName                  :IDE_Conf_Form_Refresh
        IF Sender.Tag = 22 THEN IDE.ExternalApp2 = OpenDialog.FileName                  :IDE_Conf_Form_Refresh
        IF Sender.Tag = 23 THEN IDE.ExternalApp3 = OpenDialog.FileName                  :IDE_Conf_Form_Refresh
        IF Sender.Tag = 24 THEN IDE.ExternalApp4 = OpenDialog.FileName                  :IDE_Conf_Form_Refresh
        IF Sender.Tag = 30 THEN IDE.upx = OpenDialog.FileName                           :IDE_Conf_Form_Refresh
        IF Sender.Tag = 31 THEN IDE.ResHacker = OpenDialog.FileName                     :IDE_Conf_Form_Refresh
       END IF


      ELSE
       tmpList.Clear
       gListOkButton.Tag = 2               'set our action
       gListBox.Visible = False
       gListLabel.Visible = False
       DirTree.PARENT = gListForm          'must use only one QDirTree per app!!
       DirTree.Align = alNone
       DirTree.InitialDir = Application.Path
       DirTree.Left = 0
       DirTree.Top = 22
       DirTree.Width = 318
       DirTree.Height = 550
       gListForm.CAPTION = "Select path/ file"
       gListForm.Width = 352
       gListForm.SHOWMODAL

       DEFSTR TheResult = tmpList.Text
       tmpList.Clear
       TheResult = TheResult - CHR$(10)      'the QDirTree returns LF CR !!
       TheResult = TheResult - CHR$(13)

       SELECT CASE Sender.Tag
       CASE 2          'lib path , no trailing slash!
        IF TheResult <> "" THEN
         IDE.CompilerLibPath = TheResult
         IF RIGHT$(IDE.CompilerLibPath, 1) = "\" THEN
          IDE.CompilerLibPath = LEFT$(IDE.CompilerLibPath, LEN(IDE.CompilerLibPath)-1)
         END IF
         IDE_Conf_Form_Refresh
        END IF

       CASE 3          'inc path, no trailing slash!
        IF TheResult <> "" THEN
         IDE.CompilerIncPath = TheResult
         IF RIGHT$(IDE.CompilerIncPath, 1) = "\" THEN
          IDE.CompilerIncPath = LEFT$(IDE.CompilerIncPath, LEN(IDE.CompilerIncPath)-1)
         END IF
         IDE_Conf_Form_Refresh
        END IF

       CASE 4          'icon path, no trailing slash!
        IF TheResult <> "" THEN
         IDE.CompilerIconPath = TheResult
         IF RIGHT$(IDE.CompilerIconPath, 1) = "\" THEN
          IDE.CompilerIconPath = LEFT$(IDE.CompilerIconPath, LEN(IDE.CompilerIconPath)-1)
         END IF
         IDE_Conf_Form_Refresh
        END IF

       CASE 5          'templates path
        IF TheResult <> "" THEN IDE.CompilerTemplatePath = TheResult    : IDE_Conf_Form_Refresh

       CASE 99
        IF TheResult <> "" THEN DirSearchEdit.Text = TheResult
       END SELECT
      END IF

    'return it back to normal
      DirTree.PARENT = ProjPanel
      DirTree.Height = MainForm.ClientHeight / 4
      DirTree.Width  = ProjPanel.Width
      DirTree.Align = alClient
      DirTree.Top = 2
      DirTree.Left = 1
      DirTree.InitialDir =TheCurDir
      DirTree.Directory = TheCurDir
     END SUB



     SUB IDE_Conf_Menus_DefaultButton_Click
      IF MESSAGEBOX("Set Defaults?", "Set Shortcut keys to defaults", 1) = True THEN
       IDE.MenuShortCutFile = ""                                 'clear filename to load defaults
       SHOWMESSAGE "Defaults set on next restart..."
      END IF
     END SUB


     SUB IDE_Conf_Menus_LoadButton_Click
      fDialog.Filter = "Text files|*.txt|All Files|*.*"
      fDialog.Mode = fdOpen
      fDialog.MultiSelect = False
      IF fDialog.EXECUTE THEN
       IF FILEEXISTS (fDialog.FileName) = True THEN
            'Clear (no IDE_Conf_MenuGrid.Clear)
        DEFINT x,y
        FOR y = 1 TO IDE_Conf_MenuGrid.RowCount-1
         FOR x = 0 TO IDE_Conf_MenuGrid.ColCount-1
          IDE_Conf_MenuGrid.Cell(x,y)= ""
         NEXT x
        NEXT y
        gFStream.OPEN(fDialog.FileName, fmOpenRead)
        gMem.CopyFrom(gFStream, gFStream.Size)        'store it to our memory, will not work from QFileStream
        gMem.Position = 0
        IDE_Conf_MenuGrid.LoadFromStream(gMem, 1, 0, IDE_Conf_MenuGrid.RowCount )
        IDE_Conf_MenuGrid.Tag = True
        gFStream.CLOSE
       END IF
      END IF
     END SUB


     SUB IDE_Conf_Menus_SaveButton_Click
      fDialog.Filter = "Text files|*.txt|All Files|*.*"
      fDialog.Mode = fdSave
      fDialog.MultiSelect = False
      IF fDialog.EXECUTE THEN
       IF FILEEXISTS(fDialog.FileName) THEN KILL fDialog.FileName
       tmpList.Clear
       DEFINT x, y
       DEFSTR s = ""                                                   'SaveToStream does not work!!
       FOR y = 1 TO IDE_Conf_MenuGrid.RowCount-1                       'save cells manually
        FOR x = 0 TO IDE_Conf_MenuGrid.ColCount-2
         s = s + IDE_Conf_MenuGrid.Cell(x, y) + IDE_Conf_MenuGrid.Separator
        NEXT x
        s = s + IDE_Conf_MenuGrid.Cell(x, y)                        'get last entry w/o separator, but lf
        tmpList.AddItems(s)
        s = ""
       NEXT y
       IDE.MenuShortCutList = tmpList.Text
       tmpList.SaveToFile(fDialog.FileName)                                    'save the modified menu to disk
       IDE.MenuShortCutFile = fDialog.FileName                                 'set environment to load on restart
       SetMenuShortcuts                                                        'now set the menus
      END IF
     END SUB


     SUB IDE_Conf_LoadProject
      IF (ini.Exist = 0) THEN EXIT SUB
      ini.Section = "Last Project File"
      DEFSTR tmpStr = ini.GET("Main", "")
      IF TmpStr <> "" THEN MFE_LoadProject(TmpStr)
     END SUB


     SUB ClearIni
      IF ini.Exist THEN
       KILL ini.FileName
       DO: DOEVENTS
      LOOP UNTIL (FILEEXISTS(ini.FileName) = False)
      gFStream.OPEN(ini.FileName, fmCreate)
      gFStream.WriteLine(" ")
      gFStream.CLOSE
     END IF
     END SUB


     SUB IDE_SetDefaultVariables
      IF MFE_List.ItemCount = 0 THEN
       IF MESSAGEDLG("You must close all files before continuing. Close all files?", mtWarning, mbYes OR mbNo, 0) = mrYes THEN
        MFE_CloseAll
       END IF
      END IF

      IF MESSAGEDLG("Clear setup and Overwrite with Defaults?", mtWarning, mbYes OR mbNo, 0) = mrYes THEN
       ini.FileName = TheMainIniFile
       IF ini.Exist THEN ClearIni
       IDE.New                                         'set defaults
       WriteIDEVariables(True)                         'write them, then reset environment
       IDE_UpdateRecentList
       IDE_Conf_Form.CLOSE
      END IF
     END SUB



     SUB IDE_Conf_Form_LoadIni
      fDialog.FileName = ""
      fDialog.Filter = "ini files|*.ini|All Files|*.*"
      fDialog.Mode = fdOpen
      fDialog.MultiSelect = False
      IF fDialog.EXECUTE THEN
       IF FILEEXISTS (fDialog.FileName) = True THEN
        ini.FileName = fDialog.FileName
        ReadIDEVariables                                'read in new ini, then reset environment
        ini.FileName = TheMainIniFile                   'reset to default
       END IF
      END IF
     END SUB



掌柜推荐
 
 
¥1,800.00 ·
 
 
¥489.00 ·
 
 
¥288.00 ·
 
 
¥908.00 ·
 
 
¥748.00 ·
 
 
¥264.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2013-06-19 07:43:05