A Form Wrapped by a Class


When the CAbout Load method is called, it calls the Show method of the FAbout form, which calls Form_Load. That’s where the real work finally gets done:

Sub Form_Load()
With Client
BugMessage "Loading About"
If anim Is Nothing Then Set anim = New CButterFly
Set anim.Canvas = pbAnimate
Me.Caption = "About " & .ProductName
lblApp.Caption = .Title
Const sInfo = "\msapps\msinfo\msinfo32.exe"
' Allow override because some customers might not have MSINFO
If InfoProg = sEmpty Then
InfoProg = System.WindowsDir & sInfo
End If
If ExistFile(InfoProg) = False Then cmdInfo.Visible = False

' Icon from first form is application icon
If Not ClientIcon Is Nothing Then
If ClientIcon.Type = vbPicTypeIcon Then
Set Me.Icon = ClientIcon
End If
Set imgIcon.Picture = ClientIcon
End If
lblMode.Caption = System.Mode & " on " & System.Processor
lblPhysicalMemory.Caption = System.FreePhysicalMemory & _
" KB of " & System.TotalPhysicalMemory & " KB"
lblVirtualMemory.Caption = System.FreeVirtualMemory & _
" KB of " & System.TotalVirtualMemory & " KB"
lblMemoryLoad.Caption = System.MemoryLoad & "%"
lblUser.Caption = System.User
lblMachine.Caption = System.Machine
If UserInfo(1) = sEmpty And UserInfo(2) = sEmpty And _
UserInfo(3) = sEmpty Then
fmUserInfo.Visible = False
Else
fmUserInfo.Visible = True
lblUserInfo(0).Caption = UserInfo(1)
lblUserInfo(1).Caption = UserInfo(2)
lblUserInfo(2).Caption = UserInfo(3)
End If
If Copyright = sEmpty Then Copyright = .LegalCopyright
lblRights.Caption = Copyright
If Comments = sEmpty Then Comments = .Comments
lblComment.Caption = Comments
lblVersion.Caption = "Version " & .Major & "." & .Minor
End With
End Sub

The rest of FAbout continues in the same vein. It gets a little bit of information here, and a little bit there. I’ll let you figure out the rest.