home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Programmer'…arterly (Limited Edition)
/
Visual_Basic_Programmers_Journal_VB-CD_Quarterly_Limited_Edition_1995.iso
/
code
/
ch29code
/
frmabout.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1995-08-02
|
12KB
|
347 lines
VERSION 4.00
Begin VB.Form frmAbout
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Dialog
Caption = "About Program"
ClientHeight = 3105
ClientLeft = 810
ClientTop = 1560
ClientWidth = 5490
ClipControls = 0 'False
ControlBox = 0 'False
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 3510
Icon = "frmabout.frx":0000
Left = 750
LinkMode = 1 'Source
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3105
ScaleWidth = 5490
Top = 1215
Width = 5610
Begin VB.CommandButton cmdSysInfo
Caption = "&System Info..."
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 400
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 375
Left = 4200
TabIndex = 7
Top = 600
Visible = 0 'False
Width = 1230
End
Begin VB.CommandButton cmdOk
Caption = "&Ok"
Default = -1 'True
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 400
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 375
Left = 4200
TabIndex = 0
Top = 150
Width = 1215
End
Begin VB.Line Lines
BorderColor = &H00808080&
Index = 3
X1 = 840
X2 = 5400
Y1 = 2910
Y2 = 2910
End
Begin VB.Line Lines
BorderColor = &H00FFFFFF&
Index = 0
X1 = 825
X2 = 5400
Y1 = 2925
Y2 = 2925
End
Begin VB.Line Lines
BorderColor = &H00FFFFFF&
Index = 2
X1 = 840
X2 = 5400
Y1 = 2280
Y2 = 2280
End
Begin VB.Line Lines
BorderColor = &H00808080&
Index = 1
X1 = 855
X2 = 5400
Y1 = 2265
Y2 = 2265
End
Begin VB.Label Labels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "This product is licensed to:"
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 400
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 195
Index = 8
Left = 855
TabIndex = 8
Top = 1215
Width = 1890
End
Begin VB.Image img
Height = 480
Left = 90
Top = 135
Width = 480
End
Begin VB.Label Labels
BackStyle = 0 'Transparent
Caption = "Software Technical Support at (555) 555-5555."
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 400
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 255
Index = 7
Left = 855
TabIndex = 9
Top = 2655
Width = 4000
End
Begin VB.Label Labels
BackStyle = 0 'Transparent
Caption = "For problems with this product, please call Martinsen's"
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 400
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 255
Index = 6
Left = 855
TabIndex = 10
Top = 2385
Width = 4000
End
Begin VB.Label Labels
BackStyle = 0 'Transparent
Caption = "Product ID: 546A56-4565D-J56E31"
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 400
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 195
Index = 5
Left = 855
TabIndex = 6
Top = 1980
Width = 3000
End
Begin VB.Label Labels
BackStyle = 0 'Transparent
Caption = "The VB Programmer Shop"
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 400
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 195
Index = 4
Left = 855
TabIndex = 5
Top = 1725
Width = 3000
End
Begin VB.Label Labels
BackStyle = 0 'Transparent
Caption = "John Doe"
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 400
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 195
Index = 3
Left = 840
TabIndex = 4
Top = 1470
Width = 3000
End
Begin VB.Label Labels
BackStyle = 0 'Transparent
Caption = "Copyright
1993-1994 Martinsen's Software"
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 400
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 255
Index = 2
Left = 855
TabIndex = 3
Top = 675
Width = 3255
End
Begin VB.Label Labels
BackStyle = 0 'Transparent
Caption = "Version 1.00.01"
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 400
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 255
Index = 1
Left = 855
TabIndex = 2
Top = 405
Width = 3555
End
Begin VB.Label Labels
BackStyle = 0 'Transparent
Caption = "Product Name"
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 400
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 855
TabIndex = 1
Top = 135
Width = 3555
End
Attribute VB_Name = "frmAbout"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
'****************************************************************
' FRMABOUT.FRM - Demonstrates how to handle a missing componet.
'****************************************************************
Option Explicit
Private WinDir As String
#If Win32 Then
Const SYSINFO = "msapps\msinfo\msinfo32.exe"
Private Declare Function GetWindowsDirectory& Lib "Kernel32" _
Alias "GetWindowsDirectoryA" (ByVal buffer$, ByVal bufLen&)
#Else
Const SYSINFO = "msapps\msinfo\msinfo.exe"
Private Declare Function GetWindowsDirectory% Lib "Kernel" _
(ByVal buffer$, ByVal bufLen%)
#End If
'****************************************************************
' Unload the form.
'****************************************************************
Private Sub cmdOk_Click()
Unload Me
End Sub
'****************************************************************
' Start the Microsoft System Information program.
'****************************************************************
Private Sub cmdSysInfo_Click()
Shell WinDir & SYSINFO, vbNormalFocus
End Sub
'****************************************************************
' Load the form and determine if the System Info button should
' be visible.
'****************************************************************
Private Sub Form_Load()
'************************************************************
' Always use system colors.
'************************************************************
Lines(0).BorderColor = vb3DHighlight
Lines(1).BorderColor = vb3DShadow
Lines(2).BorderColor = vb3DHighlight
Lines(3).BorderColor = vb3DShadow
BackColor = vb3DFace
'************************************************************
' Change the picture displayed in the image control.
'************************************************************
img.picture = Me.Icon
'************************************************************
' Center the form.
'************************************************************
Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
'************************************************************
' Get the path to the Windows directory.
'************************************************************
WinDir = Space(2048)
WinDir = Left(WinDir, GetWindowsDirectory(WinDir, _
Len(WinDir))) & "\"
'************************************************************
'Set the visible status depending on the existence of the file.
'************************************************************
cmdSysInfo.Visible = FileExists(WinDir & SYSINFO)
End Sub
'****************************************************************
' Determine if the file exists, and return the result.
'****************************************************************
Private Function FileExists(sFileName As String) As Boolean
On Error Resume Next
FileExists = IIf(Dir(sFileName) <> "", True, False)
End Function