home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
tool
/
disktool
/
dfinfo
/
dfsample.frm
< prev
next >
Wrap
Text File
|
1995-02-27
|
13KB
|
442 lines
VERSION 2.00
Begin Form DFSample
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Double
Caption = "DFInfo Sample"
ClientHeight = 4380
ClientLeft = 1350
ClientTop = 1965
ClientWidth = 5865
Height = 4905
Left = 1290
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4380
ScaleWidth = 5865
Top = 1500
Width = 5985
Begin Frame Frame2
BackColor = &H00C0C0C0&
Caption = "File Info"
Height = 4155
Left = 3015
TabIndex = 13
Top = 90
Width = 2760
Begin TextBox Text1
Height = 285
Left = 945
TabIndex = 31
Top = 1080
Width = 1680
End
Begin FileListBox File1
Height = 420
Left = 765
TabIndex = 30
Top = 1440
Width = 1860
End
Begin DirListBox Dir1
Height = 705
Left = 765
TabIndex = 29
Top = 315
Width = 1860
End
Begin PictureBox Picture2
BorderStyle = 0 'None
Height = 420
Left = 180
Picture = DFSAMPLE.FRX:0000
ScaleHeight = 511.305
ScaleMode = 0 'User
ScaleWidth = 511.305
TabIndex = 14
Top = 315
Width = 420
End
Begin Label Label20
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Filename:"
Height = 195
Left = 90
TabIndex = 32
Top = 1170
Width = 825
End
Begin Label Label9
BorderStyle = 1 'Fixed Single
Height = 240
Left = 1035
TabIndex = 18
Top = 2250
Width = 1590
End
Begin Label Label19
BorderStyle = 1 'Fixed Single
Height = 240
Left = 1035
TabIndex = 28
Top = 3825
Width = 1590
End
Begin Label Label18
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "System:"
Height = 195
Left = 315
TabIndex = 27
Top = 3870
Width = 675
End
Begin Label Label17
BorderStyle = 1 'Fixed Single
Height = 240
Left = 1035
TabIndex = 26
Top = 3510
Width = 1590
End
Begin Label Label16
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "ReadOnly:"
Height = 195
Left = 90
TabIndex = 25
Top = 3555
Width = 900
End
Begin Label Label15
BorderStyle = 1 'Fixed Single
Height = 240
Left = 1035
TabIndex = 24
Top = 3195
Width = 1590
End
Begin Label Label14
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Hidden:"
Height = 195
Left = 315
TabIndex = 23
Top = 3240
Width = 675
End
Begin Label Label13
BorderStyle = 1 'Fixed Single
Height = 240
Left = 1035
TabIndex = 22
Top = 2880
Width = 1590
End
Begin Label Label12
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Archived:"
Height = 195
Left = 180
TabIndex = 21
Top = 2925
Width = 825
End
Begin Label Label11
BorderStyle = 1 'Fixed Single
Height = 240
Left = 1035
TabIndex = 20
Top = 2565
Width = 1590
End
Begin Label Label10
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Time:"
Height = 195
Left = 495
TabIndex = 19
Top = 2610
Width = 480
End
Begin Label Label8
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Date:"
Height = 195
Left = 495
TabIndex = 17
Top = 2295
Width = 480
End
Begin Label Label7
BorderStyle = 1 'Fixed Single
Height = 240
Left = 1035
TabIndex = 16
Top = 1935
Width = 1590
End
Begin Label Label6
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Size:"
Height = 195
Left = 540
TabIndex = 15
Top = 1980
Width = 435
End
End
Begin FileInfo FileInfo1
Filename = ""
Left = 630
Top = 3240
End
Begin DiskInfo DiskInfo1
Disk = ""
Left = 90
Top = 3240
End
Begin Frame Frame1
BackColor = &H00C0C0C0&
Caption = "Disk Info"
Height = 3000
Left = 90
TabIndex = 0
Top = 90
Width = 2760
Begin DriveListBox Drive1
Height = 315
Left = 720
TabIndex = 2
Top = 360
Width = 1950
End
Begin PictureBox Picture1
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 420
Left = 120
Picture = DFSAMPLE.FRX:023A
ScaleHeight = 420
ScaleWidth = 420
TabIndex = 1
Top = 360
Width = 420
End
Begin Label StartupDrive
BorderStyle = 1 'Fixed Single
Height = 255
Left = 1575
TabIndex = 12
Top = 2520
Width = 1095
End
Begin Label Label5
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Start-Up Drive:"
Height = 195
Left = 0
TabIndex = 11
Top = 2565
Width = 1515
End
Begin Label NumFloppies
BorderStyle = 1 'Fixed Single
Height = 255
Left = 1575
TabIndex = 10
Top = 2160
Width = 1080
End
Begin Label Label4
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "# Floppies:"
Height = 195
Left = 135
TabIndex = 9
Top = 2205
Width = 1380
End
Begin Label VolumeName
BorderStyle = 1 'Fixed Single
Height = 255
Left = 1305
TabIndex = 8
Top = 960
Width = 1365
End
Begin Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Volume:"
Height = 195
Left = 585
TabIndex = 7
Top = 990
Width = 690
End
Begin Label Network
BorderStyle = 1 'Fixed Single
Height = 255
Left = 1305
TabIndex = 6
Top = 1665
Width = 1365
End
Begin Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Network:"
Height = 195
Left = 495
TabIndex = 5
Top = 1710
Width = 780
End
Begin Label FreeSpace
BorderStyle = 1 'Fixed Single
Height = 255
Left = 1305
TabIndex = 3
Top = 1305
Width = 1350
End
Begin Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Free Space:"
Height = 195
Left = 225
TabIndex = 4
Top = 1350
Width = 1050
End
End
End
Option Explicit
Sub Dir1_Change ()
File1.Path = Dir1.Path
File1.Refresh
End Sub
Sub Drive1_Change ()
Dir1.Path = Drive1.Drive + "\"
Dir1.Refresh
DiskInfo1.Disk = Drive1
VolumeName = DiskInfo1.VolumeName
FreeSpace = DiskInfo1.FreeSpace
If DiskInfo1.Network Then
Network = "Network"
Else
Network = "Local"
End If
End Sub
Sub File1_Click ()
Dim Path$
If Not Right$(Dir1.Path, 1) = "\" Then
Path$ = Dir1.Path + "\"
Else
Path$ = Dir1.Path
End If
FileInfo1.Filename = Path$ + File1.Filename
Label7.Caption = Str$(FileInfo1.Size)
Label9.Caption = FileInfo1.FileDate
Label11.Caption = FileInfo1.FileTime
If FileInfo1.IsArchived Then
Label13.Caption = "True"
Else
Label13.Caption = "False"
End If
If FileInfo1.IsHidden Then
Label15.Caption = "True"
Else
Label15.Caption = "False"
End If
If FileInfo1.IsReadOnly Then
Label17.Caption = "True"
Else
Label17.Caption = "False"
End If
If FileInfo1.IsSystem Then
Label19.Caption = "True"
Else
Label19.Caption = "False"
End If
End Sub
Sub Form_Load ()
DFSample.Left = (Screen.Width - DFSample.Width) / 2
DFSample.Top = (Screen.Height - DFSample.Height) / 2
Call Drive1_Change ' force load of labels
NumFloppies = DiskInfo1.NumFloppies
StartupDrive = DiskInfo1.StartupDrive
End Sub
Sub Form_Unload (Cancel As Integer)
End
End Sub
Sub Text1_Change ()
Dim Path$
If Not Right$(Dir1.Path, 1) = "\" Then
Path$ = Dir1.Path + "\"
Else
Path$ = Dir1.Path
End If
FileInfo1.Filename = Path$ + text1.Text
Label7.Caption = Str$(FileInfo1.Size)
Label9.Caption = FileInfo1.FileDate
Label11.Caption = FileInfo1.FileTime
If FileInfo1.IsArchived Then
Label13.Caption = "True"
Else
Label13.Caption = "False"
End If
If FileInfo1.IsHidden Then
Label15.Caption = "True"
Else
Label15.Caption = "False"
End If
If FileInfo1.IsReadOnly Then
Label17.Caption = "True"
Else
Label17.Caption = "False"
End If
If FileInfo1.IsSystem Then
Label19.Caption = "True"
Else
Label19.Caption = "False"
End If
End Sub