home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 22 / CD_ASCQ_22_0695.iso / win / prg / psmmm11.exe / SAMPLE.ENU / SAMPLE1 / BASIC / PSMMM.FRM < prev    next >
Text File  |  1995-04-04  |  10KB  |  335 lines

  1. VERSION 2.00
  2. Begin Form frmMain 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "PSMMM.VBX"
  6.    ClientHeight    =   3735
  7.    ClientLeft      =   1320
  8.    ClientTop       =   1830
  9.    ClientWidth     =   6195
  10.    Height          =   4425
  11.    Icon            =   PSMMM.FRX:0000
  12.    Left            =   1260
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    ScaleHeight     =   3735
  16.    ScaleWidth      =   6195
  17.    Top             =   1200
  18.    Width           =   6315
  19.    Begin PSMMM psmMain 
  20.       FileName        =   "SAMPLE1.LRS"
  21.       Left            =   3330
  22.       Top             =   30
  23.    End
  24.    Begin ListBox lstLanguageIncluded 
  25.       FontBold        =   0   'False
  26.       FontItalic      =   0   'False
  27.       FontName        =   "MS Sans Serif"
  28.       FontSize        =   8.25
  29.       FontStrikethru  =   0   'False
  30.       FontUnderline   =   0   'False
  31.       Height          =   1005
  32.       Left            =   135
  33.       TabIndex        =   0
  34.       Top             =   420
  35.       Width           =   1770
  36.    End
  37.    Begin Label Label1 
  38.       AutoSize        =   -1  'True
  39.       Caption         =   "The advantages:"
  40.       ForeColor       =   &H000000FF&
  41.       Height          =   195
  42.       Index           =   4
  43.       Left            =   150
  44.       TabIndex        =   7
  45.       Top             =   2655
  46.       Width           =   1455
  47.    End
  48.    Begin Label Label1 
  49.       Caption         =   "The application can now support X languages. Since all the comments in all the supported languages are together in a unique file, they are easy to maintain. This file is created with a FREEWARE editor specially dedicated to the work of translation: PSMLEDIT."
  50.       FontBold        =   0   'False
  51.       FontItalic      =   0   'False
  52.       FontName        =   "MS Sans Serif"
  53.       FontSize        =   8.25
  54.       FontStrikethru  =   0   'False
  55.       FontUnderline   =   0   'False
  56.       Height          =   975
  57.       Index           =   3
  58.       Left            =   1620
  59.       TabIndex        =   6
  60.       Top             =   2655
  61.       Width           =   4350
  62.    End
  63.    Begin Label Label1 
  64.       AutoSize        =   -1  'True
  65.       Caption         =   "The principle: "
  66.       ForeColor       =   &H000000FF&
  67.       Height          =   195
  68.       Index           =   2
  69.       Left            =   150
  70.       TabIndex        =   5
  71.       Top             =   1965
  72.       Width           =   1245
  73.    End
  74.    Begin Label Label1 
  75.       Caption         =   "The comments, menus, texts, etc. of the program are no longer hard coded in the application itself but they are in an outward resource file."
  76.       FontBold        =   0   'False
  77.       FontItalic      =   0   'False
  78.       FontName        =   "MS Sans Serif"
  79.       FontSize        =   8.25
  80.       FontStrikethru  =   0   'False
  81.       FontUnderline   =   0   'False
  82.       Height          =   600
  83.       Index           =   1
  84.       Left            =   1620
  85.       TabIndex        =   4
  86.       Top             =   1965
  87.       Width           =   3975
  88.    End
  89.    Begin Label Label1 
  90.       Caption         =   "The PSMMM.VBX give you an easy way to create multi language applications."
  91.       FontBold        =   0   'False
  92.       FontItalic      =   0   'False
  93.       FontName        =   "MS Sans Serif"
  94.       FontSize        =   8.25
  95.       FontStrikethru  =   0   'False
  96.       FontUnderline   =   0   'False
  97.       Height          =   285
  98.       Index           =   0
  99.       Left            =   150
  100.       TabIndex        =   3
  101.       Top             =   1665
  102.       Width           =   5895
  103.    End
  104.    Begin Label lblLanguage 
  105.       BackColor       =   &H00C0C0C0&
  106.       BackStyle       =   0  'Transparent
  107.       Caption         =   "Language"
  108.       Height          =   195
  109.       Left            =   2400
  110.       TabIndex        =   2
  111.       Top             =   585
  112.       Width           =   1305
  113.    End
  114.    Begin Shape shpDummy 
  115.       BackColor       =   &H00808080&
  116.       BackStyle       =   1  'Opaque
  117.       BorderColor     =   &H00000000&
  118.       Height          =   1005
  119.       Left            =   180
  120.       Top             =   465
  121.       Width           =   1770
  122.    End
  123.    Begin Label lblLanguageIncluded 
  124.       BackColor       =   &H00C0C0C0&
  125.       BackStyle       =   0  'Transparent
  126.       Caption         =   "Included Languages"
  127.       FontBold        =   -1  'True
  128.       FontItalic      =   0   'False
  129.       FontName        =   "MS Sans Serif"
  130.       FontSize        =   8.25
  131.       FontStrikethru  =   0   'False
  132.       FontUnderline   =   -1  'True
  133.       ForeColor       =   &H00000000&
  134.       Height          =   225
  135.       Left            =   120
  136.       TabIndex        =   1
  137.       Top             =   105
  138.       Width           =   2430
  139.    End
  140.    Begin Image imgSelectedCountry 
  141.       Height          =   480
  142.       Left            =   2400
  143.       Picture         =   PSMMM.FRX:0302
  144.       Top             =   45
  145.       Width           =   480
  146.    End
  147.    Begin Image imgCountry 
  148.       Height          =   480
  149.       Index           =   2
  150.       Left            =   1350
  151.       Picture         =   PSMMM.FRX:0604
  152.       Top             =   4155
  153.       Visible         =   0   'False
  154.       Width           =   480
  155.    End
  156.    Begin Image imgCountry 
  157.       Height          =   480
  158.       Index           =   1
  159.       Left            =   735
  160.       Picture         =   PSMMM.FRX:0906
  161.       Top             =   4140
  162.       Visible         =   0   'False
  163.       Width           =   480
  164.    End
  165.    Begin Image imgCountry 
  166.       Height          =   480
  167.       Index           =   0
  168.       Left            =   90
  169.       Picture         =   PSMMM.FRX:0C08
  170.       Top             =   4155
  171.       Visible         =   0   'False
  172.       Width           =   480
  173.    End
  174.    Begin Shape Shape1 
  175.       BackStyle       =   1  'Opaque
  176.       Height          =   2100
  177.       Left            =   60
  178.       Top             =   1590
  179.       Width           =   6000
  180.    End
  181.    Begin Menu mnuMain 
  182.       Caption         =   "&File"
  183.       Index           =   1
  184.       Begin Menu mnuFile 
  185.          Caption         =   "New..."
  186.          Index           =   101
  187.       End
  188.       Begin Menu mnuFile 
  189.          Caption         =   "Open..."
  190.          Index           =   102
  191.       End
  192.       Begin Menu mnuFile 
  193.          Caption         =   "Close"
  194.          Index           =   103
  195.       End
  196.       Begin Menu mnuFile 
  197.          Caption         =   "Delete"
  198.          Index           =   104
  199.       End
  200.       Begin Menu mnuFile 
  201.          Caption         =   "-"
  202.          Index           =   105
  203.       End
  204.       Begin Menu mnuFile 
  205.          Caption         =   "Print..."
  206.          Index           =   106
  207.       End
  208.       Begin Menu mnuFile 
  209.          Caption         =   "-"
  210.          Index           =   107
  211.       End
  212.       Begin Menu mnuFile 
  213.          Caption         =   "E&xit"
  214.          Index           =   108
  215.       End
  216.    End
  217.    Begin Menu mnuMain 
  218.       Caption         =   "&Language"
  219.       Index           =   2
  220.       Begin Menu mnuLanguage 
  221.          Caption         =   "Deutsch"
  222.          Index           =   201
  223.       End
  224.       Begin Menu mnuLanguage 
  225.          Caption         =   "Franτais"
  226.          Index           =   202
  227.       End
  228.       Begin Menu mnuLanguage 
  229.          Caption         =   "English"
  230.          Index           =   203
  231.       End
  232.    End
  233.    Begin Menu mnuMain 
  234.       Caption         =   "&Help"
  235.       Index           =   9
  236.       Begin Menu mnuHelp 
  237.          Caption         =   "About PSMMM.VBX"
  238.          Index           =   901
  239.       End
  240.    End
  241. End
  242. Option Explicit
  243.  
  244. Sub Form_Load ()
  245.     
  246.     Call PSMLoadLanguageList(psmMain, lstLanguageIncluded)
  247.     lstLanguageIncluded.ListIndex = 0
  248.  
  249. End Sub
  250.  
  251. Sub lstLanguageIncluded_Click ()
  252. Dim nTmp As Integer
  253.  
  254. ' Set the actual language
  255.      nTmp = PSMSetLanguage(psmMain, (lstLanguageIncluded.Text))
  256.  
  257. End Sub
  258.  
  259. Sub mnuFile_Click (Index As Integer)
  260.  
  261.     Unload frmMain
  262.     
  263. End Sub
  264.  
  265. Sub mnuHelp_Click (Index As Integer)
  266.  
  267.     Select Case Index
  268.         Case 901
  269.             frmAbout.Show 1
  270.         
  271.     End Select
  272.  
  273. End Sub
  274.  
  275. Sub mnuLanguage_Click (Index As Integer)
  276.  
  277.     Select Case Index
  278.         Case 201
  279.             lstLanguageIncluded.ListIndex = 0
  280.         Case 202
  281.             lstLanguageIncluded.ListIndex = 1
  282.         Case 203
  283.             lstLanguageIncluded.ListIndex = 2
  284.     End Select
  285.  
  286. End Sub
  287.  
  288. Sub PRVChangeMainComment ()
  289.  
  290.     frmMain.lblLanguageIncluded = PSMGetComment(psmMain, MSG_MAIN_IncludedLang1)
  291.     frmMain.lblLanguage = PSMGetComment(psmMain, MSG_SYS_LangName100)
  292.  
  293. End Sub
  294.  
  295. Sub PRVChangeMainMenu ()
  296.  
  297.     frmMain.mnuMain(1).Caption = PSMGetComment(psmMain, MSG_MENU_File1)
  298.     frmMain.mnuFile(101).Caption = PSMGetComment(psmMain, MSG_MENU_New101)
  299.     frmMain.mnuFile(102).Caption = PSMGetComment(psmMain, MSG_MENU_Open102)
  300.     frmMain.mnuFile(103).Caption = PSMGetComment(psmMain, MSG_MENU_Close103)
  301.     frmMain.mnuFile(104).Caption = PSMGetComment(psmMain, MSG_MENU_Delete104)
  302.     frmMain.mnuFile(106).Caption = PSMGetComment(psmMain, MSG_MENU_Print107)
  303.     frmMain.mnuFile(108).Caption = PSMGetComment(psmMain, MSG_MENU_Exit108)
  304.     
  305.     frmMain.mnuMain(2).Caption = PSMGetComment(psmMain, MSG_MENU_Language2)
  306.     
  307.     frmMain.mnuMain(9).Caption = PSMGetComment(psmMain, MSG_MENU_Help9)
  308.     frmMain.mnuHelp(901).Caption = PSMGetComment(psmMain, MSG_MENU_About999)
  309.  
  310. End Sub
  311.  
  312. Sub psmMain_LanguageChange (NewLanguage As String)
  313.  
  314. ' Initialize all visible messages in the main form
  315.     mnuLanguage(201).Checked = False
  316.     mnuLanguage(202).Checked = False
  317.     mnuLanguage(203).Checked = False
  318.     Select Case NewLanguage
  319.         Case "deu"
  320.             imgSelectedCountry.Picture = imgCountry(1).Picture
  321.             mnuLanguage(201).Checked = True
  322.         Case "fra"
  323.             imgSelectedCountry.Picture = imgCountry(0).Picture
  324.             mnuLanguage(202).Checked = True
  325.         Case "eng"
  326.             imgSelectedCountry.Picture = imgCountry(2).Picture
  327.             mnuLanguage(203).Checked = True
  328.     End Select
  329.  
  330.     Call PRVChangeMainMenu
  331.     Call PRVChangeMainComment
  332.  
  333. End Sub
  334.  
  335.