home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / PROGRAM / VISBASIC / DFINFO23 / SAMPLE.ARJ / DFSAMPLE.FRM < prev    next >
Text File  |  1993-11-04  |  13KB  |  442 lines

  1. VERSION 2.00
  2. Begin Form DFSample 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "DFInfo Sample"
  6.    ClientHeight    =   4380
  7.    ClientLeft      =   1350
  8.    ClientTop       =   1965
  9.    ClientWidth     =   5865
  10.    Height          =   4785
  11.    Left            =   1290
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    ScaleHeight     =   4380
  15.    ScaleWidth      =   5865
  16.    Top             =   1620
  17.    Width           =   5985
  18.    Begin Frame Frame2 
  19.       BackColor       =   &H00C0C0C0&
  20.       Caption         =   "File Info"
  21.       Height          =   4155
  22.       Left            =   3015
  23.       TabIndex        =   13
  24.       Top             =   90
  25.       Width           =   2760
  26.       Begin TextBox Text1 
  27.          Height          =   285
  28.          Left            =   945
  29.          TabIndex        =   31
  30.          Top             =   1080
  31.          Width           =   1680
  32.       End
  33.       Begin FileListBox File1 
  34.          Height          =   420
  35.          Left            =   765
  36.          TabIndex        =   30
  37.          Top             =   1440
  38.          Width           =   1860
  39.       End
  40.       Begin DirListBox Dir1 
  41.          Height          =   705
  42.          Left            =   765
  43.          TabIndex        =   29
  44.          Top             =   315
  45.          Width           =   1860
  46.       End
  47.       Begin PictureBox Picture2 
  48.          BorderStyle     =   0  'None
  49.          Height          =   420
  50.          Left            =   180
  51.          Picture         =   DFSAMPLE.FRX:0000
  52.          ScaleHeight     =   511.305
  53.          ScaleMode       =   0  'User
  54.          ScaleWidth      =   511.305
  55.          TabIndex        =   14
  56.          Top             =   315
  57.          Width           =   420
  58.       End
  59.       Begin Label Label20 
  60.          Alignment       =   1  'Right Justify
  61.          AutoSize        =   -1  'True
  62.          BackStyle       =   0  'Transparent
  63.          Caption         =   "Filename:"
  64.          Height          =   195
  65.          Left            =   90
  66.          TabIndex        =   32
  67.          Top             =   1170
  68.          Width           =   825
  69.       End
  70.       Begin Label Label9 
  71.          BorderStyle     =   1  'Fixed Single
  72.          Height          =   240
  73.          Left            =   1035
  74.          TabIndex        =   18
  75.          Top             =   2250
  76.          Width           =   1590
  77.       End
  78.       Begin Label Label19 
  79.          BorderStyle     =   1  'Fixed Single
  80.          Height          =   240
  81.          Left            =   1035
  82.          TabIndex        =   28
  83.          Top             =   3825
  84.          Width           =   1590
  85.       End
  86.       Begin Label Label18 
  87.          Alignment       =   1  'Right Justify
  88.          AutoSize        =   -1  'True
  89.          BackStyle       =   0  'Transparent
  90.          Caption         =   "System:"
  91.          Height          =   195
  92.          Left            =   315
  93.          TabIndex        =   27
  94.          Top             =   3870
  95.          Width           =   675
  96.       End
  97.       Begin Label Label17 
  98.          BorderStyle     =   1  'Fixed Single
  99.          Height          =   240
  100.          Left            =   1035
  101.          TabIndex        =   26
  102.          Top             =   3510
  103.          Width           =   1590
  104.       End
  105.       Begin Label Label16 
  106.          Alignment       =   1  'Right Justify
  107.          AutoSize        =   -1  'True
  108.          BackStyle       =   0  'Transparent
  109.          Caption         =   "ReadOnly:"
  110.          Height          =   195
  111.          Left            =   90
  112.          TabIndex        =   25
  113.          Top             =   3555
  114.          Width           =   900
  115.       End
  116.       Begin Label Label15 
  117.          BorderStyle     =   1  'Fixed Single
  118.          Height          =   240
  119.          Left            =   1035
  120.          TabIndex        =   24
  121.          Top             =   3195
  122.          Width           =   1590
  123.       End
  124.       Begin Label Label14 
  125.          Alignment       =   1  'Right Justify
  126.          AutoSize        =   -1  'True
  127.          BackStyle       =   0  'Transparent
  128.          Caption         =   "Hidden:"
  129.          Height          =   195
  130.          Left            =   315
  131.          TabIndex        =   23
  132.          Top             =   3240
  133.          Width           =   675
  134.       End
  135.       Begin Label Label13 
  136.          BorderStyle     =   1  'Fixed Single
  137.          Height          =   240
  138.          Left            =   1035
  139.          TabIndex        =   22
  140.          Top             =   2880
  141.          Width           =   1590
  142.       End
  143.       Begin Label Label12 
  144.          Alignment       =   1  'Right Justify
  145.          AutoSize        =   -1  'True
  146.          BackStyle       =   0  'Transparent
  147.          Caption         =   "Archived:"
  148.          Height          =   195
  149.          Left            =   180
  150.          TabIndex        =   21
  151.          Top             =   2925
  152.          Width           =   825
  153.       End
  154.       Begin Label Label11 
  155.          BorderStyle     =   1  'Fixed Single
  156.          Height          =   240
  157.          Left            =   1035
  158.          TabIndex        =   20
  159.          Top             =   2565
  160.          Width           =   1590
  161.       End
  162.       Begin Label Label10 
  163.          Alignment       =   1  'Right Justify
  164.          AutoSize        =   -1  'True
  165.          BackStyle       =   0  'Transparent
  166.          Caption         =   "Time:"
  167.          Height          =   195
  168.          Left            =   495
  169.          TabIndex        =   19
  170.          Top             =   2610
  171.          Width           =   480
  172.       End
  173.       Begin Label Label8 
  174.          Alignment       =   1  'Right Justify
  175.          AutoSize        =   -1  'True
  176.          BackStyle       =   0  'Transparent
  177.          Caption         =   "Date:"
  178.          Height          =   195
  179.          Left            =   495
  180.          TabIndex        =   17
  181.          Top             =   2295
  182.          Width           =   480
  183.       End
  184.       Begin Label Label7 
  185.          BorderStyle     =   1  'Fixed Single
  186.          Height          =   240
  187.          Left            =   1035
  188.          TabIndex        =   16
  189.          Top             =   1935
  190.          Width           =   1590
  191.       End
  192.       Begin Label Label6 
  193.          Alignment       =   1  'Right Justify
  194.          AutoSize        =   -1  'True
  195.          BackStyle       =   0  'Transparent
  196.          Caption         =   "Size:"
  197.          Height          =   195
  198.          Left            =   540
  199.          TabIndex        =   15
  200.          Top             =   1980
  201.          Width           =   435
  202.       End
  203.    End
  204.    Begin FileInfo FileInfo1 
  205.       Filename        =   ""
  206.       Left            =   630
  207.       Top             =   3240
  208.    End
  209.    Begin DiskInfo DiskInfo1 
  210.       Disk            =   ""
  211.       Left            =   90
  212.       Top             =   3240
  213.    End
  214.    Begin Frame Frame1 
  215.       BackColor       =   &H00C0C0C0&
  216.       Caption         =   "Disk Info"
  217.       Height          =   3000
  218.       Left            =   90
  219.       TabIndex        =   0
  220.       Top             =   90
  221.       Width           =   2760
  222.       Begin DriveListBox Drive1 
  223.          Height          =   315
  224.          Left            =   720
  225.          TabIndex        =   2
  226.          Top             =   360
  227.          Width           =   1950
  228.       End
  229.       Begin PictureBox Picture1 
  230.          AutoSize        =   -1  'True
  231.          BorderStyle     =   0  'None
  232.          Height          =   420
  233.          Left            =   120
  234.          Picture         =   DFSAMPLE.FRX:023A
  235.          ScaleHeight     =   420
  236.          ScaleWidth      =   420
  237.          TabIndex        =   1
  238.          Top             =   360
  239.          Width           =   420
  240.       End
  241.       Begin Label StartupDrive 
  242.          BorderStyle     =   1  'Fixed Single
  243.          Height          =   255
  244.          Left            =   1575
  245.          TabIndex        =   12
  246.          Top             =   2520
  247.          Width           =   1095
  248.       End
  249.       Begin Label Label5 
  250.          Alignment       =   1  'Right Justify
  251.          AutoSize        =   -1  'True
  252.          BackStyle       =   0  'Transparent
  253.          Caption         =   "Start-Up Drive:"
  254.          Height          =   195
  255.          Left            =   0
  256.          TabIndex        =   11
  257.          Top             =   2565
  258.          Width           =   1515
  259.       End
  260.       Begin Label NumFloppies 
  261.          BorderStyle     =   1  'Fixed Single
  262.          Height          =   255
  263.          Left            =   1575
  264.          TabIndex        =   10
  265.          Top             =   2160
  266.          Width           =   1080
  267.       End
  268.       Begin Label Label4 
  269.          Alignment       =   1  'Right Justify
  270.          AutoSize        =   -1  'True
  271.          BackStyle       =   0  'Transparent
  272.          Caption         =   "# Floppies:"
  273.          Height          =   195
  274.          Left            =   135
  275.          TabIndex        =   9
  276.          Top             =   2205
  277.          Width           =   1380
  278.       End
  279.       Begin Label VolumeName 
  280.          BorderStyle     =   1  'Fixed Single
  281.          Height          =   255
  282.          Left            =   1305
  283.          TabIndex        =   8
  284.          Top             =   960
  285.          Width           =   1365
  286.       End
  287.       Begin Label Label3 
  288.          AutoSize        =   -1  'True
  289.          BackStyle       =   0  'Transparent
  290.          Caption         =   "Volume:"
  291.          Height          =   195
  292.          Left            =   585
  293.          TabIndex        =   7
  294.          Top             =   990
  295.          Width           =   690
  296.       End
  297.       Begin Label Network 
  298.          BorderStyle     =   1  'Fixed Single
  299.          Height          =   255
  300.          Left            =   1305
  301.          TabIndex        =   6
  302.          Top             =   1665
  303.          Width           =   1365
  304.       End
  305.       Begin Label Label2 
  306.          AutoSize        =   -1  'True
  307.          BackStyle       =   0  'Transparent
  308.          Caption         =   "Network:"
  309.          Height          =   195
  310.          Left            =   495
  311.          TabIndex        =   5
  312.          Top             =   1710
  313.          Width           =   780
  314.       End
  315.       Begin Label FreeSpace 
  316.          BorderStyle     =   1  'Fixed Single
  317.          Height          =   255
  318.          Left            =   1305
  319.          TabIndex        =   3
  320.          Top             =   1305
  321.          Width           =   1350
  322.       End
  323.       Begin Label Label1 
  324.          AutoSize        =   -1  'True
  325.          BackStyle       =   0  'Transparent
  326.          Caption         =   "Free Space:"
  327.          Height          =   195
  328.          Left            =   225
  329.          TabIndex        =   4
  330.          Top             =   1350
  331.          Width           =   1050
  332.       End
  333.    End
  334. End
  335. Option Explicit
  336.  
  337. Sub Dir1_Change ()
  338.     File1.Path = Dir1.Path
  339.     File1.Refresh
  340. End Sub
  341.  
  342. Sub Drive1_Change ()
  343.     Dir1.Path = Drive1.Drive + "\"
  344.     Dir1.Refresh
  345.     
  346.     DiskInfo1.Disk = Drive1
  347.  
  348.     VolumeName = DiskInfo1.VolumeName
  349.     FreeSpace = DiskInfo1.FreeSpace
  350.  
  351.     If DiskInfo1.Network Then
  352.         Network = "Network"
  353.     Else
  354.         Network = "Local"
  355.     End If
  356. End Sub
  357.  
  358. Sub File1_Click ()
  359.     Dim Path$
  360.  
  361.     If Not Right$(Dir1.Path, 1) = "\" Then
  362.         Path$ = Dir1.Path + "\"
  363.     Else
  364.         Path$ = Dir1.Path
  365.     End If
  366.     FileInfo1.Filename = Path$ + File1.FileName
  367.  
  368.     Label7.Caption = Str$(FileInfo1.Size)
  369.     Label9.Caption = FileInfo1.FileDate
  370.     Label11.Caption = FileInfo1.FileTime
  371.     If FileInfo1.IsArchived Then
  372.         Label13.Caption = "True"
  373.     Else
  374.         Label13.Caption = "False"
  375.     End If
  376.     If FileInfo1.IsHidden Then
  377.         Label15.Caption = "True"
  378.     Else
  379.         Label15.Caption = "False"
  380.     End If
  381.     If FileInfo1.IsReadOnly Then
  382.         Label17.Caption = "True"
  383.     Else
  384.         Label17.Caption = "False"
  385.     End If
  386.     If FileInfo1.IsSystem Then
  387.         Label19.Caption = "True"
  388.     Else
  389.         Label19.Caption = "False"
  390.     End If
  391. End Sub
  392.  
  393. Sub Form_Load ()
  394.     DFSample.Left = (Screen.Width - DFSample.Width) / 2
  395.     DFSample.Top = (Screen.Height - DFSample.Height) / 2
  396.  
  397.     Call Drive1_Change    ' force load of labels
  398.  
  399.     NumFloppies = DiskInfo1.NumFloppies
  400.     StartupDrive = DiskInfo1.StartupDrive
  401. End Sub
  402.  
  403. Sub Form_Unload (Cancel As Integer)
  404.     End
  405. End Sub
  406.  
  407. Sub Text1_Change ()
  408.     Dim Path$
  409.  
  410.         If Not Right$(Dir1.Path, 1) = "\" Then
  411.             Path$ = Dir1.Path + "\"
  412.         Else
  413.             Path$ = Dir1.Path
  414.         End If
  415.         FileInfo1.Filename = Path$ + text1.Text
  416.  
  417.         Label7.Caption = Str$(FileInfo1.Size)
  418.         Label9.Caption = FileInfo1.FileDate
  419.         Label11.Caption = FileInfo1.FileTime
  420.         If FileInfo1.IsArchived Then
  421.             Label13.Caption = "True"
  422.         Else
  423.             Label13.Caption = "False"
  424.         End If
  425.         If FileInfo1.IsHidden Then
  426.             Label15.Caption = "True"
  427.         Else
  428.             Label15.Caption = "False"
  429.         End If
  430.         If FileInfo1.IsReadOnly Then
  431.             Label17.Caption = "True"
  432.         Else
  433.             Label17.Caption = "False"
  434.         End If
  435.         If FileInfo1.IsSystem Then
  436.             Label19.Caption = "True"
  437.         Else
  438.             Label19.Caption = "False"
  439.         End If
  440. End Sub
  441.  
  442.