home *** CD-ROM | disk | FTP | other *** search
/ Master 95 #1 / MASTER95_1.iso / microsof / vbasic4 / vb4-6.cab / dskspace.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-07-26  |  11.3 KB  |  348 lines

  1. VERSION 4.00
  2. Begin VB.Form frmDskSpace 
  3.    AutoRedraw      =   -1  'True
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "#"
  6.    ClientHeight    =   2550
  7.    ClientLeft      =   870
  8.    ClientTop       =   1530
  9.    ClientWidth     =   5355
  10.    ClipControls    =   0   'False
  11.    BeginProperty Font 
  12.       name            =   "MS Sans Serif"
  13.       charset         =   0
  14.       weight          =   700
  15.       size            =   8.25
  16.       underline       =   0   'False
  17.       italic          =   0   'False
  18.       strikethrough   =   0   'False
  19.    EndProperty
  20.    Height          =   2955
  21.    Icon            =   "DSKSPACE.frx":0000
  22.    Left            =   810
  23.    LinkTopic       =   "Form1"
  24.    LockControls    =   -1  'True
  25.    MaxButton       =   0   'False
  26.    MinButton       =   0   'False
  27.    ScaleHeight     =   2550
  28.    ScaleWidth      =   5355
  29.    Top             =   1185
  30.    Width           =   5475
  31.    Begin VB.CommandButton cmdExit 
  32.       Cancel          =   -1  'True
  33.       Caption         =   "#"
  34.       BeginProperty Font 
  35.          name            =   "MS Sans Serif"
  36.          charset         =   0
  37.          weight          =   400
  38.          size            =   8.25
  39.          underline       =   0   'False
  40.          italic          =   0   'False
  41.          strikethrough   =   0   'False
  42.       EndProperty
  43.       Height          =   420
  44.       Left            =   3570
  45.       TabIndex        =   2
  46.       Top             =   1965
  47.       Width           =   1560
  48.    End
  49.    Begin VB.CommandButton cmdInstall 
  50.       Caption         =   "#"
  51.       BeginProperty Font 
  52.          name            =   "MS Sans Serif"
  53.          charset         =   0
  54.          weight          =   400
  55.          size            =   8.25
  56.          underline       =   0   'False
  57.          italic          =   0   'False
  58.          strikethrough   =   0   'False
  59.       EndProperty
  60.       Height          =   420
  61.       Left            =   1875
  62.       TabIndex        =   1
  63.       Top             =   1965
  64.       Width           =   1560
  65.    End
  66.    Begin VB.CommandButton cmdChgDrv 
  67.       Caption         =   "#"
  68.       Default         =   -1  'True
  69.       BeginProperty Font 
  70.          name            =   "MS Sans Serif"
  71.          charset         =   0
  72.          weight          =   400
  73.          size            =   8.25
  74.          underline       =   0   'False
  75.          italic          =   0   'False
  76.          strikethrough   =   0   'False
  77.       EndProperty
  78.       Height          =   420
  79.       Left            =   192
  80.       TabIndex        =   0
  81.       Top             =   1968
  82.       Width           =   1560
  83.    End
  84.    Begin VB.Label lblDisk 
  85.       BorderStyle     =   1  'Fixed Single
  86.       BeginProperty Font 
  87.          name            =   "MS Sans Serif"
  88.          charset         =   0
  89.          weight          =   400
  90.          size            =   8.25
  91.          underline       =   0   'False
  92.          italic          =   0   'False
  93.          strikethrough   =   0   'False
  94.       EndProperty
  95.       Height          =   216
  96.       Index           =   0
  97.       Left            =   240
  98.       TabIndex        =   4
  99.       Top             =   1308
  100.       Visible         =   0   'False
  101.       Width           =   504
  102.    End
  103.    Begin VB.Label lblAvail 
  104.       Alignment       =   1  'Right Justify
  105.       BorderStyle     =   1  'Fixed Single
  106.       BeginProperty Font 
  107.          name            =   "MS Sans Serif"
  108.          charset         =   0
  109.          weight          =   400
  110.          size            =   8.25
  111.          underline       =   0   'False
  112.          italic          =   0   'False
  113.          strikethrough   =   0   'False
  114.       EndProperty
  115.       Height          =   216
  116.       Index           =   0
  117.       Left            =   2340
  118.       TabIndex        =   5
  119.       Top             =   1308
  120.       Visible         =   0   'False
  121.       Width           =   1260
  122.    End
  123.    Begin VB.Label lblNeed 
  124.       Alignment       =   1  'Right Justify
  125.       BorderStyle     =   1  'Fixed Single
  126.       BeginProperty Font 
  127.          name            =   "MS Sans Serif"
  128.          charset         =   0
  129.          weight          =   400
  130.          size            =   8.25
  131.          underline       =   0   'False
  132.          italic          =   0   'False
  133.          strikethrough   =   0   'False
  134.       EndProperty
  135.       Height          =   216
  136.       Index           =   0
  137.       Left            =   3888
  138.       TabIndex        =   6
  139.       Top             =   1308
  140.       Visible         =   0   'False
  141.       Width           =   1260
  142.    End
  143.    Begin VB.Label lblReq 
  144.       Alignment       =   1  'Right Justify
  145.       BorderStyle     =   1  'Fixed Single
  146.       BeginProperty Font 
  147.          name            =   "MS Sans Serif"
  148.          charset         =   0
  149.          weight          =   400
  150.          size            =   8.25
  151.          underline       =   0   'False
  152.          italic          =   0   'False
  153.          strikethrough   =   0   'False
  154.       EndProperty
  155.       Height          =   216
  156.       Index           =   0
  157.       Left            =   804
  158.       TabIndex        =   7
  159.       Top             =   1308
  160.       Visible         =   0   'False
  161.       Width           =   1260
  162.    End
  163.    Begin VB.Shape shpSpace 
  164.       BorderColor     =   &H00000000&
  165.       Height          =   396
  166.       Left            =   192
  167.       Top             =   1224
  168.       Width           =   4980
  169.    End
  170.    Begin VB.Label lblDiskH 
  171.       AutoSize        =   -1  'True
  172.       Caption         =   "#"
  173.       BeginProperty Font 
  174.          name            =   "MS Sans Serif"
  175.          charset         =   0
  176.          weight          =   400
  177.          size            =   8.25
  178.          underline       =   0   'False
  179.          italic          =   0   'False
  180.          strikethrough   =   0   'False
  181.       EndProperty
  182.       Height          =   195
  183.       Left            =   240
  184.       TabIndex        =   8
  185.       Top             =   1005
  186.       Width           =   105
  187.    End
  188.    Begin VB.Label lblAvailH 
  189.       Alignment       =   1  'Right Justify
  190.       Caption         =   "#"
  191.       BeginProperty Font 
  192.          name            =   "MS Sans Serif"
  193.          charset         =   0
  194.          weight          =   400
  195.          size            =   8.25
  196.          underline       =   0   'False
  197.          italic          =   0   'False
  198.          strikethrough   =   0   'False
  199.       EndProperty
  200.       Height          =   408
  201.       Left            =   2352
  202.       TabIndex        =   11
  203.       Top             =   804
  204.       Width           =   1260
  205.       WordWrap        =   -1  'True
  206.    End
  207.    Begin VB.Label lblNeedH 
  208.       Alignment       =   1  'Right Justify
  209.       Caption         =   "#"
  210.       BeginProperty Font 
  211.          name            =   "MS Sans Serif"
  212.          charset         =   0
  213.          weight          =   400
  214.          size            =   8.25
  215.          underline       =   0   'False
  216.          italic          =   0   'False
  217.          strikethrough   =   0   'False
  218.       EndProperty
  219.       Height          =   408
  220.       Left            =   3888
  221.       TabIndex        =   10
  222.       Top             =   804
  223.       Width           =   1260
  224.       WordWrap        =   -1  'True
  225.    End
  226.    Begin VB.Label lblReqH 
  227.       Alignment       =   1  'Right Justify
  228.       Caption         =   "#"
  229.       BeginProperty Font 
  230.          name            =   "MS Sans Serif"
  231.          charset         =   0
  232.          weight          =   400
  233.          size            =   8.25
  234.          underline       =   0   'False
  235.          italic          =   0   'False
  236.          strikethrough   =   0   'False
  237.       EndProperty
  238.       Height          =   408
  239.       Left            =   804
  240.       TabIndex        =   9
  241.       Top             =   804
  242.       Width           =   1260
  243.       WordWrap        =   -1  'True
  244.    End
  245.    Begin VB.Shape shpHeading 
  246.       BorderColor     =   &H00000000&
  247.       Height          =   480
  248.       Left            =   192
  249.       Top             =   744
  250.       Width           =   4980
  251.    End
  252.    Begin VB.Label lblNoSpace 
  253.       AutoSize        =   -1  'True
  254.       Caption         =   "#"
  255.       BeginProperty Font 
  256.          name            =   "MS Sans Serif"
  257.          charset         =   0
  258.          weight          =   400
  259.          size            =   8.25
  260.          underline       =   0   'False
  261.          italic          =   0   'False
  262.          strikethrough   =   0   'False
  263.       EndProperty
  264.       Height          =   195
  265.       Left            =   195
  266.       TabIndex        =   3
  267.       Top             =   150
  268.       Width           =   105
  269.    End
  270. Attribute VB_Name = "frmDskSpace"
  271. Attribute VB_Creatable = False
  272. Attribute VB_Exposed = False
  273. Option Explicit
  274. Option Compare Text
  275. 'Form/Module Constants
  276. Const strFMT$ = "######0 K"
  277. Private Sub cmdChgDrv_Click()
  278.     gfRetVal = gintRET_CANCEL
  279.     Unload Me
  280. End Sub
  281. Private Sub cmdExit_Click()
  282.     ExitSetup Me, gintRET_EXIT
  283. End Sub
  284. Private Sub cmdInstall_Click()
  285.     gfRetVal = gintRET_CONT
  286.     Unload Me
  287. End Sub
  288. Private Sub Form_Load()
  289.     Const ONE_K& = 1024
  290.     Dim intIdx As Integer
  291.     Dim lAvail As Long
  292.     Dim lReq As Long
  293.     Dim intHeight As Integer
  294.     Dim intTop As Integer
  295.     cmdExit.Caption = ResolveResString(resBTNEXIT)
  296.     cmdInstall.Caption = ResolveResString(resBTNINSTALLNOW)
  297.     cmdChgDrv.Caption = ResolveResString(resBTNCHGDRV)
  298.     lblDiskH.Caption = ResolveResString(resLBLDRIVE)
  299.     lblAvailH.Caption = ResolveResString(resLBLAVAIL)
  300.     lblNeedH.Caption = ResolveResString(resLBLNEEDED)
  301.     lblReqH.Caption = ResolveResString(resLBLREQUIRED)
  302.     lblNoSpace.Caption = ResolveResString(resLBLNOSPACE)
  303.     frmDskSpace.Caption = gstrTitle
  304.     intHeight = lblDisk(0).Height * 1.6
  305.     intTop = lblDisk(0).Top
  306.     '
  307.     'borders are for design mode only...
  308.     '
  309.     lblDisk(0).BorderStyle = 0
  310.     lblReq(0).BorderStyle = 0
  311.     lblAvail(0).BorderStyle = 0
  312.     lblNeed(0).BorderStyle = 0
  313.     For intIdx = 1 To Len(gstrDrivesUsed)
  314.         Load lblDisk(intIdx)
  315.         Load lblReq(intIdx)
  316.         Load lblAvail(intIdx)
  317.         Load lblNeed(intIdx)
  318.         lAvail = gsDiskSpace(intIdx).lAvail
  319.         lReq = gsDiskSpace(intIdx).lReq
  320.         lblDisk(intIdx).Caption = Mid$(gstrDrivesUsed, intIdx, 1) & gstrCOLON
  321.         lblReq(intIdx).Caption = Format$(lReq / ONE_K, strFMT)
  322.         lblAvail(intIdx).Caption = Format$(lAvail / ONE_K, strFMT)
  323.         lblNeed(intIdx).Caption = Format$(IIf(lReq > lAvail, lReq - lAvail, 0) / ONE_K, strFMT)
  324.         lblDisk(intIdx).Top = intTop
  325.         lblReq(intIdx).Top = intTop
  326.         lblAvail(intIdx).Top = intTop
  327.         lblNeed(intIdx).Top = intTop
  328.         intTop = intTop + intHeight
  329.         lblDisk(intIdx).Visible = True
  330.         lblReq(intIdx).Visible = True
  331.         lblAvail(intIdx).Visible = True
  332.         lblNeed(intIdx).Visible = True
  333.     Next
  334.     shpSpace.Height = intHeight * (intIdx - 1)
  335.     cmdChgDrv.Top = shpSpace.Top + shpSpace.Height + cmdChgDrv.Height
  336.     cmdInstall.Top = cmdChgDrv.Top
  337.     cmdExit.Top = cmdChgDrv.Top
  338.     frmDskSpace.Height = cmdChgDrv.Top + cmdChgDrv.Height * 2.5
  339.     EtchedLine Me, 100, cmdChgDrv.Top - cmdChgDrv.Height * 0.5, Me.ScaleWidth - 200
  340.     CenterForm Me
  341. End Sub
  342. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  343.     If UnloadMode <> 1 Then
  344.         ExitSetup Me, gintRET_EXIT
  345.         Cancel = 1
  346.     End If
  347. End Sub
  348.