home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Internet Business Development Kit / PRODUCT_CD.iso / sqlsvr / alpha / dbmdi.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-19  |  3.8 KB  |  129 lines

  1. VERSION 4.00
  2. Begin VB.Form DBMDI 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Manage Databases"
  5.    ClientHeight    =   3870
  6.    ClientLeft      =   2670
  7.    ClientTop       =   3225
  8.    ClientWidth     =   6600
  9.    Height          =   4275
  10.    Left            =   2610
  11.    LinkTopic       =   "Form1"
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   3870
  14.    ScaleWidth      =   6600
  15.    Top             =   2880
  16.    Width           =   6720
  17.    Begin Threed.SSPanel toolbar 
  18.       Align           =   1  'Align Top
  19.       Height          =   405
  20.       Left            =   0
  21.       TabIndex        =   1
  22.       Top             =   0
  23.       Width           =   6600
  24.       _version        =   65536
  25.       _extentx        =   11642
  26.       _extenty        =   714
  27.       _stockprops     =   15
  28.       Begin Threed.SSCommand Command1 
  29.          Height          =   285
  30.          Left            =   180
  31.          TabIndex        =   2
  32.          Top             =   60
  33.          Width           =   975
  34.          _version        =   65536
  35.          _extentx        =   1720
  36.          _extenty        =   503
  37.          _stockprops     =   78
  38.          caption         =   "&Backup"
  39.          bevelwidth      =   1
  40.          outline         =   0   'False
  41.       End
  42.    End
  43.    Begin GraphLib.Graph DBChart 
  44.       Height          =   3315
  45.       Left            =   330
  46.       TabIndex        =   0
  47.       Top             =   540
  48.       Width           =   5775
  49.       _version        =   65536
  50.       _extentx        =   10186
  51.       _extenty        =   5847
  52.       _stockprops     =   96
  53.       autoinc         =   0
  54.       bottomtitle     =   "Databases"
  55.       graphstyle      =   3
  56.       graphtype       =   4
  57.       legendstyle     =   1
  58.       numsets         =   2
  59.       randomdata      =   1
  60.       colordata       =   0
  61.       extradata       =   0
  62.       extradata[]     =   0
  63.       fontfamily      =   4
  64.       fontfamily[0]   =   2
  65.       fontfamily[1]   =   2
  66.       fontfamily[2]   =   2
  67.       fontfamily[3]   =   2
  68.       fontsize        =   4
  69.       fontsize[0]     =   300
  70.       fontsize[1]     =   150
  71.       fontsize[2]     =   100
  72.       fontsize[3]     =   100
  73.       fontstyle       =   4
  74.       fontstyle[0]    =   2
  75.       fontstyle[1]    =   2
  76.       fontstyle[2]    =   2
  77.       fontstyle[3]    =   2
  78.       graphdata       =   0
  79.       graphdata[]     =   5
  80.       labeltext       =   0
  81.       legendtext      =   2
  82.       legendtext[0]   =   "Space Used"
  83.       legendtext[1]   =   "Space Available"
  84.       patterndata     =   0
  85.       symboldata      =   0
  86.       xposdata        =   0
  87.       xposdata[]      =   0
  88.    End
  89. Attribute VB_Name = "DBMDI"
  90. Attribute VB_Creatable = False
  91. Attribute VB_Exposed = False
  92. Private Sub Command1_Click()
  93. Backup.Show 1
  94. End Sub
  95. Private Sub Command122_Click()
  96. End Sub
  97. Private Sub Form_Load()
  98. ' set form title
  99.   DBMDI.Caption = "\\" + OServer.Name + "- Databases"
  100.   Dim ii As Integer
  101. ' create database object
  102.   Set MyDB = CreateObject("SQLOLE.Database")
  103. ' set chart parameters
  104.   DBChart.NumPoints = OServer.Databases.Count
  105.   DBChart.NumSets = 2
  106.   DBChart.ThisSet = 1
  107.   ii = 0
  108. ' chart all databases on the OServer
  109.   For Each MyDB In OServer.Databases
  110.         ii = ii + 1
  111.         DBChart.ThisPoint = ii
  112.         DBChart.LabelText = MyDB.Name       ' name
  113.         spac = MyDB.SpaceAvailableInMB  '/ 1024    ' convert to MB
  114.         DBChart.ThisSet = 1
  115.         DBChart.GraphData = MyDB.Size - spac        ' calc space used
  116.         DBChart.ThisSet = 2
  117.         DBChart.GraphData = spac
  118.   Next
  119. End Sub
  120. Private Sub Form_Resize()
  121. ' resize chart to fill MDI
  122. If WindowState <> 1 Then
  123.     DBChart.Left = 0
  124.     DBChart.Top = Toolbar.Height
  125.     DBChart.Width = DBMDI.Width
  126.     DBChart.Height = DBMDI.Height - 400 - Toolbar.Height
  127. End If
  128. End Sub
  129.