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

📄 addcell.frm

📁 CELL-ID技术是目前最简单的定位技术
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form 增加基站 
   Caption         =   "增加基站"
   ClientHeight    =   3210
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   3975
   Icon            =   "addcell.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3210
   ScaleWidth      =   3975
   StartUpPosition =   2  '屏幕中心
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   480
      Top             =   2040
      Visible         =   0   'False
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   495
      Left            =   2400
      TabIndex        =   7
      Top             =   2400
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   495
      Left            =   600
      TabIndex        =   6
      Top             =   2400
      Width           =   975
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   1680
      TabIndex        =   5
      Top             =   1680
      Width           =   1695
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1680
      TabIndex        =   4
      Top             =   960
      Width           =   1695
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1680
      TabIndex        =   3
      Top             =   240
      Width           =   1695
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "基站纬度:"
      Height          =   180
      Left            =   600
      TabIndex        =   2
      Top             =   1800
      Width           =   900
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "基站经度:"
      Height          =   180
      Left            =   600
      TabIndex        =   1
      Top             =   1080
      Width           =   900
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "基站名称:"
      Height          =   180
      Left            =   600
      TabIndex        =   0
      Top             =   360
      Width           =   900
   End
End
Attribute VB_Name = "增加基站"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
  If Text1.Text = "" Then MsgBox "基站名称不能为空!": Exit Sub
  If Text2.Text = "" Then MsgBox "基站经度不能为空!": Exit Sub
  If Text3.Text = "" Then MsgBox "基站纬度不能为空!": Exit Sub
  Adodc1.RecordSource = "select * from 基站信息 where 基站名='" + Text1.Text + "'"
  Adodc1.Refresh
  If Adodc1.Recordset.RecordCount > 0 Then
    MsgBox "此基站名称已经存在!"
    Text1.SetFocus   '使控件获得焦点
    Text1.SelStart = 0
    Text1.SelLength = Len(Text1.Text)
  'End If
  Else
    Adodc1.Recordset.AddNew   '开辟一个存储空间,准备存储数据
    Adodc1.Recordset.Fields(1) = Text1.Text
    Adodc1.Recordset.Fields(2) = Text2.Text
    Adodc1.Recordset.Fields(3) = Text3.Text
    Adodc1.Recordset.Update   '保存数据
    MsgBox "新的基站添加成功!"
    Adodc1.Refresh
  Unload Me
  基站设置.Show
  End If
End Sub

Private Sub Command2_Click()
Unload Me
基站设置.Show
End Sub

Private Sub Form_Load()
  Adodc1.ConnectionString = PublicStr
  Adodc1.RecordSource = "select * from 基站信息"
  Adodc1.Refresh
End Sub




Private Sub Text1_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
     SendKeys "{TAB}"
  End If
End Sub


Private Sub Text2_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
     SendKeys "{TAB}"
  End If
End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
     Call Command1_Click
  End If
End Sub


Private Sub Form_Unload(Cancel As Integer)
  系统主窗口.Enabled = True
End Sub

⌨️ 快捷键说明

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