⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.ebf

📁 windows mobile 应用程序开发实践一书的源代码
💻 EBF
字号:
VERSION 5.00
Object = "{25C953A7-5464-11D1-A714-00AA0044064C}#1.0#0"; "MSCEFILE.DLL"
Begin VB.Form Form1 
   Appearance      =   0  'Flat
   BackColor       =   &H00FFC0C0&
   Caption         =   "Form1"
   ClientHeight    =   3615
   ClientLeft      =   60
   ClientTop       =   840
   ClientWidth     =   3480
   ForeColor       =   &H80000008&
   ScaleHeight     =   3615
   ScaleWidth      =   3480
   ShowOK          =   -1  'True
   Begin FILECTLCtl.FileSystem FileSystem1 
      Left            =   2040
      Top             =   2640
      _cx             =   2200
      _cy             =   1400
   End
   Begin VBCE.Label Label1 
      Height          =   255
      Left            =   480
      TabIndex        =   3
      Top             =   0
      Width           =   735
      _cx             =   1296
      _cy             =   450
      AutoSize        =   0   'False
      BackColor       =   -2147483643
      BackStyle       =   1
      BorderStyle     =   0
      Caption         =   "表名称"
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   -2147483640
      Alignment       =   0
      UseMnemonic     =   -1  'True
      WordWrap        =   0   'False
   End
   Begin VBCE.CommandButton but_deltable 
      Height          =   375
      Left            =   0
      TabIndex        =   2
      Top             =   840
      Width           =   855
      _cx             =   1508
      _cy             =   661
      BackColor       =   12632256
      Caption         =   "删除表"
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Style           =   0
   End
   Begin VBCE.CommandButton but_cancel 
      Height          =   375
      Left            =   1080
      TabIndex        =   1
      Top             =   840
      Width           =   855
      _cx             =   1508
      _cy             =   661
      BackColor       =   12632256
      Caption         =   "取消"
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Style           =   0
   End
   Begin VBCE.ComboBox cb_table_deltable 
      Height          =   300
      Left            =   0
      TabIndex        =   0
      Top             =   360
      Width           =   2055
      List            =   "Form1.frx":0000
      ItemData        =   "Form1.frx":0028
      _cx             =   3625
      _cy             =   529
      BackColor       =   -2147483643
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   -2147483640
      Text            =   ""
      IntegralHeight  =   -1  'True
      Locked          =   0   'False
      Sorted          =   0   'False
      Style           =   0
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public Sub listtable()

table.MoveFirst
cb_table_deltable.Clear

Do While Not table.EOF
If table.fields("TableName") <> "MSysTables" And _
table.fields("TableName") <> "MSysFields" And _
table.fields("TableName") <> "MSysIndexes" And _
table.fields("TableName") <> "MSysProcs" Then
cb_table_deltable.AddItem table.fields("TableName")
 End If
table.MoveNext
Loop
cb_table_deltable.ListIndex = 0


End Sub
Private Sub but_deltable_Click()

If cb_table_deltable.ListIndex = -1 Then
 MsgBox "请选择表格", vbOKCancel + vbInformation, "注意"
Exit Sub
End If
Dim okornot As Integer
Dim sql As String
okornot = MsgBox("是否要删除数据表", vbOKCancel + vbInformation, "注意")
If okornot = vbOK Then
 sql = " Drop Table " & cb_table_deltable.List(cb_table_deltable.ListIndex)
 Connection.Execute sql
If Err.Number > 0 Then
MsgBox "删除表格出错", vbOKOnly, "提示"
Else
MsgBox "删除表格成功", vbOKOnly, "提示"
End If
End If
 If Not table.State = adStateClosed Then
    table.Close
End If
 table.Open "MSysTables", Connection
listtable

End Sub

Private Sub Form_Load()
 
 If Not table.State = adStateClosed Then
    table.Close
End If

 table.Open "MSysTables", Connection
 listtable
 

End Sub


Private Sub Form_OKClick()
App.End
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -