不错哦
尤其是functions.bas中下面这段很有意思
'FrmMain.Form_Load
Public Sub ShowFrmMainCaption()
On Error Resume Next
'设置对象标题
Dim itemx, IniRead As New CIniFile, tmpStr As String
IniRead.INIFileName = GetDir & strLangINI
Set itemx = frmMain
itemx.Caption = IniRead.GetIniKey("frmMain", "$" & "Caption")
For Each itemx In frmMain
tmpStr = IniRead.GetIniKey("frmMain", "$" & itemx.Tag)
If Len(tmpStr) > 0 And Len(itemx.Tag) > 0 Then
itemx.Caption = tmpStr
If Err Then
Err.Clear
itemx.Text = tmpStr
End If
End If
Next
'设置课程按钮
IniRead.INIFileName = GetDir & strOptionINI
Dim Left1 As Long, Left2 As Long, IdleHeight As Long
Left1 = 400: Left2 = 2000: IdleHeight = 200
Dim TmpCourseArray() As String, counter As Byte, intMax As Byte, intdeftop As Long
tmpStr = IniRead.GetIniKey("General", "$CourseList")
TmpCourseArray = Split(tmpStr, "|")
intMax = UBound(TmpCourseArray) + 1
ReDim Preserve TmpCourseArray(intMax)
TmpCourseArray(intMax) = "About"
intdeftop = (frmMain.cntCourseList.Height - (frmMain.btnSubject(0).Height + IdleHeight) * (intMax \ 2)) \ 2
For counter = 0 To intMax
Call Load(frmMain.btnSubject(counter + 1))
Set itemx = frmMain.btnSubject(counter + 1)
itemx.Top = intdeftop + (IdleHeight + itemx.Height) * ((counter) \ 2)
itemx.Left = IIf(counter Mod 2, Left2, Left1)
itemx.Caption = TmpCourseArray(counter)
If TmpCourseArray(counter) = "About" Then
IniRead.INIFileName = GetDir & strLangINI
itemx.Caption = IniRead.GetIniKey("frmMain", "$About")
itemx.Tag = "About"
End If
itemx.Visible = True
Next
'载入公告
IniRead.INIFileName = GetDir & strOptionINI
With frmMain.lblAnnounce
.Caption = Replace(IniRead.GetIniKey("General", "$Announce"), "crlf", vbCrLf)
.Font.Size = IniRead.GetIniKey("Announce", "Size")
.Font.Bold = IniRead.GetIniKey("Announce", "Bold")
.Font.Name = IniRead.GetIniKey("Announce", "Font")
.ForeColor = IniRead.GetIniKey("Announce", "Color")
End With
注意分发是基于GNU GPL的哦
[此贴子已经被作者于2007-8-30 6:24:06编辑过]