Sub SetControlCaption (frm As Form, ByVal iControl As Integer, ByVal szCap As String, bXlated() As Integer)
Dim szOldCap As String, szRightText As String
Dim szNewCap As String
Dim DelimAt As Integer
If (szCap = "") Then
bXlated(iControl) = True
Exit Sub
End If
On Error Resume Next
If (iControl = 0) Then
szOldCap = frm.Caption
Else
szOldCap = frm.Controls(iControl - 1).Caption
End If
DelimAt = InStr(szOldCap, ":")
If (DelimAt > 0) Then
szRightText = Mid$(szOldCap, DelimAt + 1)
szNewCap = szCap & " :" & szRightText
Else
szNewCap = szCap
End If
If (iControl = 0) Then
frm.Caption = szNewCap
Else
frm.Controls(iControl - 1).Caption = szNewCap
If (G_Sess.Language = "C") Then
frm.Controls(iControl - 1).FontName = Trim$(G_Sess.LangFont)
End If
End If
bXlated(iControl) = True
End Sub