home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 22 / CD_ASCQ_22_0695.iso / win / prg / psmmm11.exe / SAMPLE.DEU / SAMPLE1 / BASIC / PSMMM.FRM < prev    next >
Text File  |  1995-04-04  |  10KB  |  329 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      =   2775
  8.    ClientTop       =   2205
  9.    ClientWidth     =   6195
  10.    Height          =   4425
  11.    Icon            =   PSMMM.FRX:0000
  12.    Left            =   2715
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    ScaleHeight     =   3735
  16.    ScaleWidth      =   6195
  17.    Top             =   1575
  18.    Width           =   6315
  19.    Begin PSMMM psmMain 
  20.       FileName        =   "SAMPLE1.LRS"
  21.       Left            =   3345
  22.       Top             =   15
  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            =   120
  33.       TabIndex        =   0
  34.       Top             =   420
  35.       Width           =   1770
  36.    End
  37.    Begin Label Label1 
  38.       AutoSize        =   -1  'True
  39.       Caption         =   "Die Vorteile:"
  40.       ForeColor       =   &H000000FF&
  41.       Height          =   195
  42.       Index           =   4
  43.       Left            =   120
  44.       TabIndex        =   7
  45.       Top             =   2805
  46.       Width           =   1065
  47.    End
  48.    Begin Label Label1 
  49.       Caption         =   "Die Applikation kann X sprachig sein. Sie sprechen die Kommentare ⁿber Konstanten an. Die Kommentare werden alle gemeinsam an einem Ort eingegeben (PSMLEDIT: Editor der das Erstellen der Resource Dateien *.LRS erlaubt. FREEWARE)"
  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          =   810
  57.       Index           =   3
  58.       Left            =   1200
  59.       TabIndex        =   6
  60.       Top             =   2805
  61.       Width           =   4830
  62.    End
  63.    Begin Label Label1 
  64.       AutoSize        =   -1  'True
  65.       Caption         =   "Das Prinzip:"
  66.       ForeColor       =   &H000000FF&
  67.       Height          =   195
  68.       Index           =   2
  69.       Left            =   135
  70.       TabIndex        =   5
  71.       Top             =   2190
  72.       Width           =   1035
  73.    End
  74.    Begin Label Label1 
  75.       Caption         =   "Die Kommentare, Menus, Texte usw befinden sich nicht mehr statisch in der VB Applikation, sondern EXTERN in einer Resource Datei."
  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            =   1200
  85.       TabIndex        =   4
  86.       Top             =   2190
  87.       Width           =   4830
  88.    End
  89.    Begin Label Label1 
  90.       Caption         =   "Die PSMMM.VBX gibt Ihnen die M÷glichkeit ohne grosse Anstrengung eine mehrsprachige Applikation zu programmieren."
  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          =   555
  98.       Index           =   0
  99.       Left            =   135
  100.       TabIndex        =   3
  101.       Top             =   1620
  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             =   570
  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            =   75
  178.       Top             =   1560
  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 mnuHelp_Click (Index As Integer)
  260.  
  261.     Select Case Index
  262.         Case 901
  263.             frmAbout.Show 1
  264.         
  265.     End Select
  266.  
  267. End Sub
  268.  
  269. Sub mnuLanguage_Click (Index As Integer)
  270.  
  271.     Select Case Index
  272.         Case 201
  273.             lstLanguageIncluded.ListIndex = 0
  274.         Case 202
  275.             lstLanguageIncluded.ListIndex = 1
  276.         Case 203
  277.             lstLanguageIncluded.ListIndex = 2
  278.     End Select
  279.  
  280. End Sub
  281.  
  282. Sub PRVChangeMainComment ()
  283.  
  284.     frmMain.lblLanguageIncluded = PSMGetComment(psmMain, MSG_MAIN_IncludedLang1)
  285.     frmMain.lblLanguage = PSMGetComment(psmMain, MSG_SYS_LangName100)
  286.  
  287. End Sub
  288.  
  289. Sub PRVChangeMainMenu ()
  290.  
  291.     frmMain.mnuMain(1).Caption = PSMGetComment(psmMain, MSG_MENU_File1)
  292.     frmMain.mnuFile(101).Caption = PSMGetComment(psmMain, MSG_MENU_New101)
  293.     frmMain.mnuFile(102).Caption = PSMGetComment(psmMain, MSG_MENU_Open102)
  294.     frmMain.mnuFile(103).Caption = PSMGetComment(psmMain, MSG_MENU_Close103)
  295.     frmMain.mnuFile(104).Caption = PSMGetComment(psmMain, MSG_MENU_Delete104)
  296.     frmMain.mnuFile(106).Caption = PSMGetComment(psmMain, MSG_MENU_Print107)
  297.     frmMain.mnuFile(108).Caption = PSMGetComment(psmMain, MSG_MENU_Exit108)
  298.     
  299.     frmMain.mnuMain(2).Caption = PSMGetComment(psmMain, MSG_MENU_Language2)
  300.     
  301.     frmMain.mnuMain(9).Caption = PSMGetComment(psmMain, MSG_MENU_Help9)
  302.     frmMain.mnuHelp(901).Caption = PSMGetComment(psmMain, MSG_MENU_About999)
  303.  
  304. End Sub
  305.  
  306. Sub psmMain_LanguageChange (NewLanguage As String)
  307.  
  308. ' Initialize all visible messages in the main form
  309.     mnuLanguage(201).Checked = False
  310.     mnuLanguage(202).Checked = False
  311.     mnuLanguage(203).Checked = False
  312.     Select Case NewLanguage
  313.         Case "deu"
  314.             imgSelectedCountry.Picture = imgCountry(1).Picture
  315.             mnuLanguage(201).Checked = True
  316.         Case "fra"
  317.             imgSelectedCountry.Picture = imgCountry(0).Picture
  318.             mnuLanguage(202).Checked = True
  319.         Case "eng"
  320.             imgSelectedCountry.Picture = imgCountry(2).Picture
  321.             mnuLanguage(203).Checked = True
  322.     End Select
  323.  
  324.     Call PRVChangeMainMenu
  325.     Call PRVChangeMainComment
  326.  
  327. End Sub
  328.  
  329.