home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / CODIGO_1 / DF_INFO / SAMPLE.ZIP / DFSAMPLE.FRM (.txt) next >
Encoding:
Visual Basic Form  |  1993-11-04  |  13.2 KB  |  425 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. Option Explicit
  335. Sub Dir1_Change ()
  336.     File1.Path = Dir1.Path
  337.     File1.Refresh
  338. End Sub
  339. Sub Drive1_Change ()
  340.     Dir1.Path = Drive1.Drive + "\"
  341.     Dir1.Refresh
  342.     DiskInfo1.Disk = Drive1
  343.     VolumeName = DiskInfo1.VolumeName
  344.     FreeSpace = DiskInfo1.FreeSpace
  345.     If DiskInfo1.Network Then
  346.         Network = "Network"
  347.     Else
  348.         Network = "Local"
  349.     End If
  350. End Sub
  351. Sub File1_Click ()
  352.     Dim Path$
  353.     If Not Right$(Dir1.Path, 1) = "\" Then
  354.         Path$ = Dir1.Path + "\"
  355.     Else
  356.         Path$ = Dir1.Path
  357.     End If
  358.     FileInfo1.Filename = Path$ + File1.FileName
  359.     Label7.Caption = Str$(FileInfo1.Size)
  360.     Label9.Caption = FileInfo1.FileDate
  361.     Label11.Caption = FileInfo1.FileTime
  362.     If FileInfo1.IsArchived Then
  363.         Label13.Caption = "True"
  364.     Else
  365.         Label13.Caption = "False"
  366.     End If
  367.     If FileInfo1.IsHidden Then
  368.         Label15.Caption = "True"
  369.     Else
  370.         Label15.Caption = "False"
  371.     End If
  372.     If FileInfo1.IsReadOnly Then
  373.         Label17.Caption = "True"
  374.     Else
  375.         Label17.Caption = "False"
  376.     End If
  377.     If FileInfo1.IsSystem Then
  378.         Label19.Caption = "True"
  379.     Else
  380.         Label19.Caption = "False"
  381.     End If
  382. End Sub
  383. Sub Form_Load ()
  384.     DFSample.Left = (Screen.Width - DFSample.Width) / 2
  385.     DFSample.Top = (Screen.Height - DFSample.Height) / 2
  386.     Call Drive1_Change    ' force load of labels
  387.     NumFloppies = DiskInfo1.NumFloppies
  388.     StartupDrive = DiskInfo1.StartupDrive
  389. End Sub
  390. Sub Form_Unload (Cancel As Integer)
  391.     End
  392. End Sub
  393. Sub Text1_Change ()
  394.     Dim Path$
  395.         If Not Right$(Dir1.Path, 1) = "\" Then
  396.             Path$ = Dir1.Path + "\"
  397.         Else
  398.             Path$ = Dir1.Path
  399.         End If
  400.         FileInfo1.Filename = Path$ + text1.Text
  401.         Label7.Caption = Str$(FileInfo1.Size)
  402.         Label9.Caption = FileInfo1.FileDate
  403.         Label11.Caption = FileInfo1.FileTime
  404.         If FileInfo1.IsArchived Then
  405.             Label13.Caption = "True"
  406.         Else
  407.             Label13.Caption = "False"
  408.         End If
  409.         If FileInfo1.IsHidden Then
  410.             Label15.Caption = "True"
  411.         Else
  412.             Label15.Caption = "False"
  413.         End If
  414.         If FileInfo1.IsReadOnly Then
  415.             Label17.Caption = "True"
  416.         Else
  417.             Label17.Caption = "False"
  418.         End If
  419.         If FileInfo1.IsSystem Then
  420.             Label19.Caption = "True"
  421.         Else
  422.             Label19.Caption = "False"
  423.         End If
  424. End Sub
  425.