home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / bp_6_93 / vbwin / vbaccess / info.frm < prev    next >
Text File  |  1995-02-26  |  3KB  |  110 lines

  1. VERSION 2.00
  2. Begin Form frmInfo 
  3.    BackColor       =   &H8000000F&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Info"
  6.    ClientHeight    =   1650
  7.    ClientLeft      =   1515
  8.    ClientTop       =   3900
  9.    ClientWidth     =   6000
  10.    ControlBox      =   0   'False
  11.    Height          =   2055
  12.    Left            =   1455
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   1650
  17.    ScaleWidth      =   6000
  18.    Top             =   3555
  19.    Width           =   6120
  20.    Begin Frame Frame1 
  21.       BackColor       =   &H00C0C0C0&
  22.       FontBold        =   -1  'True
  23.       FontItalic      =   0   'False
  24.       FontName        =   "MS Sans Serif"
  25.       FontSize        =   12
  26.       FontStrikethru  =   0   'False
  27.       FontUnderline   =   0   'False
  28.       Height          =   1620
  29.       Left            =   60
  30.       TabIndex        =   0
  31.       Top             =   -45
  32.       Width           =   5880
  33.       Begin Timer Timer1 
  34.          Enabled         =   0   'False
  35.          Interval        =   3000
  36.          Left            =   5250
  37.          Top             =   1110
  38.       End
  39.       Begin Label Label1 
  40.          Alignment       =   2  'Center
  41.          BackColor       =   &H8000000F&
  42.          FontBold        =   -1  'True
  43.          FontItalic      =   0   'False
  44.          FontName        =   "MS Sans Serif"
  45.          FontSize        =   12
  46.          FontStrikethru  =   0   'False
  47.          FontUnderline   =   0   'False
  48.          ForeColor       =   &H00FF0000&
  49.          Height          =   1230
  50.          Left            =   120
  51.          TabIndex        =   1
  52.          Top             =   240
  53.          Width           =   5625
  54.       End
  55.    End
  56. End
  57. Option Explicit
  58.  
  59. Sub Form_Activate ()
  60. '▄bergabeprogramm mu▀ Tag belegen
  61. Dim sTitel As String
  62. Dim sMsg As String
  63. Dim iDgDef As Integer
  64. Dim iResponse As Integer
  65. Dim sText As String
  66. Dim iError As Integer
  67.  
  68. Select Case frmInfo.Tag
  69. Case INFO_COMPACT
  70.   Me.Caption = "Datenbank-Verdichtung"
  71.   Label1 = "Es wird eine Verdichtung auf die vorhandene Datenbank durchgefⁿhrt." + NL + NL + "Bitte um Geduld ! Bitte nicht unterbrechen !"
  72.   Me.Refresh
  73.   CompactDatabase sVOldfile, sVNewFile
  74. Case INFO_REPAIR
  75.   On Error GoTo Rep_Errorhandler
  76.   Me.Caption = "Datenbank-Reparatur"
  77.   Label1 = "Es wird eine Reparatur auf die vorhandene Datenbank durchgefⁿhrt." + NL + NL + "Bitte um Geduld ! Bitte nicht unterbrechen !"
  78.   Me.Refresh
  79.   RepairDatabase sMdb
  80. End Select
  81. If iError = False Then
  82.   Timer1.Enabled = True
  83. Else
  84.   Unload Me
  85. End If
  86. Exit Sub
  87.  
  88. Rep_Errorhandler:
  89. If Err = 3051 Or Err = 3000 Then 'Try to open file exclusivly, but its open
  90.   sTitel = "Reparatur fehlgeschlagen !"
  91.   sMsg = "Datenbank kann nicht repariert werden, da sie von einem anderen Benutzer bereits ge÷ffnet ist !" + NL
  92.   sMsg = sMsg + "Zum nochmaligen Reparatur-Versuch alle Zugriffe beenden und Reparatur nochmals starten !"
  93.   iDgDef = MB_OK + MB_ICONSTOP  ' Describe dialog.
  94.   iResponse = MsgBox(sMsg, iDgDef, sTitel)    ' Get user response.
  95.   iError = True
  96.   Resume Next
  97. End If
  98. End Sub
  99.  
  100. Sub Form_Load ()
  101. CenterForm Me
  102.  
  103. End Sub
  104.  
  105. Sub Timer1_Timer ()
  106. Timer1.Enabled = False
  107. Unload Me
  108. End Sub
  109.  
  110.