home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 22 / CD_ASCQ_22_0695.iso / win / prg / psmmm11.exe / SAMPLE.DEU / SAMPLE3 / BASIC / PSMMM.BAS < prev    next >
BASIC Source File  |  1995-03-15  |  2KB  |  68 lines

  1.                           
  2.  
  3. Function PSMGetComment (psmMain As Control, nMsgId As Integer) As String
  4.     
  5. On Error GoTo PSMGetComment_Error
  6.  
  7.     psmMain.MessageID = nMsgId
  8.     PSMGetComment = psmMain.Message
  9.  
  10. PSMGetComment_End:
  11.     Exit Function
  12.  
  13. PSMGetComment_Error:
  14.     Select Case Err
  15.         Case 20002
  16.             PSMGetComment = "Error"
  17.         Case 20003
  18.             PSMGetComment = ""
  19.     End Select
  20.     Resume PSMGetComment_End
  21.  
  22. End Function
  23.  
  24. Function PSMInsertVariable (sText As String, sParameter As String, sSymbole As String) As String
  25. Dim nPos     As Integer
  26. Dim sNewText As String
  27.  
  28.     sNewText = sText
  29.     nPos = InStr(1, sText, sSymbole)
  30.     If nPos > 0 Then
  31.         sNewText = Left$(sText, nPos - 1)
  32.         sNewText = sNewText + sParameter
  33.         sNewText = sNewText + Right$(sText, Len(sText) - nPos - Len(sSymbole) + 1)
  34.     End If
  35.     PSMInsertVariable = sNewText
  36.  
  37. End Function
  38.  
  39. Sub PSMLoadLanguageList (psmMain As Control, lstLanguageList As Control)
  40. Dim nCount As Integer
  41.     
  42.     For nCount = 0 To psmMain.NberOfSupportedLanguages - 1
  43.         lstLanguageList.AddItem psmMain.SupportedLanguage(nCount)
  44.     Next nCount
  45.  
  46. End Sub
  47.  
  48. Function PSMSetLanguage (psmMain As Control, sLanguage As String) As Integer
  49.  
  50. On Error GoTo PSMSetLanguage_Error
  51.  
  52.     PSMSetLanguage = True
  53.     psmMain.Language = UCase$(sLanguage)
  54.  
  55. PSMSetLanguage_End:
  56.     Exit Function
  57.  
  58.  
  59. PSMSetLanguage_Error:
  60.     Select Case Err
  61.         Case 20002
  62.             PSMSetLanguage = False
  63.     End Select
  64.     Resume PSMSetLanguage_End
  65.     
  66. End Function
  67.  
  68.