VERSION 4.00
Begin VB.Form ObjMDI 
   BackColor       =   &H00C0C0C0&
   Caption         =   "Manage Objects"
   ClientHeight    =   5145
   ClientLeft      =   2010
   ClientTop       =   2475
   ClientWidth     =   8295
   Height          =   5550
   Left            =   1950
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   5145
   ScaleWidth      =   8295
   Top             =   2130
   Width           =   8415
   Begin VB.ListBox List1 
      Height          =   3150
      Left            =   330
      TabIndex        =   5
      Top             =   540
      Width           =   3315
   End
   Begin Threed.SSPanel Toolbar 
      Align           =   1  'Align Top
      Height          =   405
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   8295
      _version        =   65536
      _extentx        =   14631
      _extenty        =   714
      _stockprops     =   15
      Begin Threed.SSCommand Command1 
         Height          =   285
         Left            =   5370
         TabIndex        =   4
         Top             =   60
         Width           =   1095
         _version        =   65536
         _extentx        =   1931
         _extenty        =   503
         _stockprops     =   78
         caption         =   "&Backup"
         bevelwidth      =   1
         outline         =   0   'False
      End
      Begin Threed.SSPanel SSPanel1 
         Height          =   330
         Left            =   1290
         TabIndex        =   2
         Top             =   30
         Width           =   2385
         _version        =   65536
         _extentx        =   4207
         _extenty        =   582
         _stockprops     =   15
         caption         =   "SSPanel1"
         bevelouter      =   1
         autosize        =   3
         Begin VB.ComboBox DBList 
            Height          =   300
            Left            =   15
            Style           =   2  'Dropdown List
            TabIndex        =   3
            Top             =   15
            Width           =   2355
         End
      End
      Begin VB.Label Label1 
         BackColor       =   &H00C0C0C0&
         Caption         =   "Database:"
         Height          =   195
         Left            =   150
         TabIndex        =   1
         Top             =   90
         Width           =   945
      End
   End
End
Attribute VB_Name = "ObjMDI"
Attribute VB_Creatable = False
Attribute VB_Exposed = False

Private Sub Command1_Click()
Backup.Show 1

End Sub




Private Sub DBGrid_RowColChange()

End Sub

Private Sub DBList_Click()

If DBList.ListIndex <> -1 Then PopulateObjectGrid (DBList.Text)

End Sub

Private Sub Form_Load()
' set form title
MousePointer = 11
  ObjMDI.Caption = "\\" + OServer.Name + "- Manage Databases"
    
  
  Dim ii As Integer
  
' set up the grid values and column headings


DBListIndex = -1
Dim MyDB As SQLOLE.Database
For Each MyDB In OServer.Databases
        ' always check that the database is accessable
        ' (database are inaccessible when being Loaded)
        If MyDB.Status <> SQLOLEDBStat_Inaccessible Then
            DBList.AddItem MyDB.Name
            DBList.ListIndex = 0
        Else
            MsgBox "Database: """ + MyDB.Name + " "" is Inaccessible at this time ", 16, "Microsoft SQL Server"
    
        End If
Next

End Sub

Sub PopulateObjectGrid(MyDB As String)


MousePointer = 11

List1.Clear

' get the contents of device 'CurrentDevice' via .ReadBackupHeader
For Each MyObject In OServer.Databases(MyDB).ListObjects
    List1.AddItem MyObject.Owner + "." + MyObject.Name
Next
MousePointer = 0
' all done

End Sub

Private Sub Form_Resize()
' resize chart to fill MDI
If WindowState <> 1 Then
    List1.Left = 0
    List1.Top = Toolbar.Height
    List1.Width = ObjMDI.Width - 100
    List1.Height = ObjMDI.Height - 400 - Toolbar.Height
End If

End Sub
