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

📄 frmdbj.frm

📁 gps控制网设计 gps控制网设计 gps控制网设计
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmdbj 
   HelpContextID   =  320
   BorderStyle     =   1  'Fixed Single
   Caption         =   "网点编辑"
   ClientHeight    =   3930
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4800
   ForeColor       =   &H8000000B&
   Icon            =   "frmdbj.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3930
   ScaleWidth      =   4800
   StartUpPosition =   2  'CenterScreen
   Begin VB.TextBox Text3 
      WhatsThisHelpID =  320  'WhatsThisHelpID for: Text3                                                                                                                            *** HelpWriter *** 
      Height          =   300
      Left            =   675
      TabIndex        =   9
      Top             =   2835
      Width           =   1080
   End
   Begin VB.CommandButton Command3 
      WhatsThisHelpID =  320  'WhatsThisHelpID for: Command3                                                                                                                         *** HelpWriter *** 
      Caption         =   "删除"
      Height          =   345
      Left            =   3645
      TabIndex        =   8
      Top             =   3315
      Width           =   960
   End
   Begin VB.CommandButton Command2 
      WhatsThisHelpID =  320  'WhatsThisHelpID for: Command2                                                                                                                         *** HelpWriter *** 
      Caption         =   "插入"
      Height          =   345
      Left            =   1950
      TabIndex        =   5
      Top             =   3315
      Width           =   960
   End
   Begin VB.CommandButton Command1 
      WhatsThisHelpID =  320  'WhatsThisHelpID for: Command1                                                                                                                         *** HelpWriter *** 
      Caption         =   "确定"
      Height          =   345
      Left            =   285
      TabIndex        =   4
      Top             =   3315
      Width           =   960
   End
   Begin VB.TextBox Text2 
      WhatsThisHelpID =  320  'WhatsThisHelpID for: Text2                                                                                                                            *** HelpWriter *** 
      Height          =   300
      Left            =   3645
      TabIndex        =   3
      Top             =   2835
      Width           =   1080
   End
   Begin VB.TextBox Text1 
      WhatsThisHelpID =  320  'WhatsThisHelpID for: Text1                                                                                                                            *** HelpWriter *** 
      Height          =   300
      Left            =   2160
      TabIndex        =   2
      Top             =   2835
      Width           =   1080
   End
   Begin VB.ListBox List1 
      WhatsThisHelpID =  320  'WhatsThisHelpID for: List1                                                                                                                            *** HelpWriter *** 
      Height          =   2400
      ItemData        =   "frmdbj.frx":0442
      Left            =   45
      List            =   "frmdbj.frx":0444
      TabIndex        =   1
      Top             =   285
      Width           =   4680
   End
   Begin VB.Label Label4 
      WhatsThisHelpID =  320  'WhatsThisHelpID for: Label4                                                                                                                           *** HelpWriter *** 
      Caption         =   "点名:"
      Height          =   285
      Left            =   0
      TabIndex        =   10
      Top             =   2835
      Width           =   555
   End
   Begin VB.Label Label3 
      WhatsThisHelpID =  320  'WhatsThisHelpID for: Label3                                                                                                                           *** HelpWriter *** 
      Caption         =   "Y:"
      Height          =   420
      Left            =   3375
      TabIndex        =   7
      Top             =   2835
      Width           =   150
   End
   Begin VB.Label Label2 
      WhatsThisHelpID =  320  'WhatsThisHelpID for: Label2                                                                                                                           *** HelpWriter *** 
      Caption         =   "X;"
      Height          =   420
      Left            =   1890
      TabIndex        =   6
      Top             =   2835
      Width           =   150
   End
   Begin VB.Label Label1 
      WhatsThisHelpID =  320  'WhatsThisHelpID for: Label1                                                                                                                           *** HelpWriter *** 
      Caption         =   " 点号:     点名:           X:           Y:"
      Height          =   300
      Left            =   75
      TabIndex        =   0
      Top             =   0
      Width           =   4530
   End
End
Attribute VB_Name = "frmdbj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim sfxg As Boolean         '判断是否为数据修改
Private Sub Command1_Click()
Unload Me
With frmkzwsj
If .wxdk Then
   .Picture1.Cls
   jsck.Pic.Cls
   Call .drawwd(.Picture1, .dqbl)
   Call .drawwd(jsck.Pic, jsck.si2)
   Call .drawkzwx(.Picture1)
   Call .drawkzwx(jsck.Pic)
Else
   .dbj = True
   Call .zkzd
End If
End With
End Sub
'修改或添加控制点数据
Private Sub Command2_Click()
Dim k%
Dim j%
  If sfxg Then
     k = MsgBox("确定要替换这一记录吗?", 65, "提示")
     If k = vbOK Then
        wdxy(List1.ListIndex + 1).Name = Text3.Text
        wdxy(List1.ListIndex + 1).X = CSng(Text1.Text)
        wdxy(List1.ListIndex + 1).Y = CSng(Text2.Text)
        List1.List(List1.ListIndex) = Format(List1.ListIndex + 1, "0000") & Space(6) & Text3.Text & Space(3) & Format(Text1.Text, "#.000") & Space(3) & Format(Text2.Text, "#.000")
        Text1.Text = ""
        Text2.Text = ""
        Text3.Text = ""
     End If
     sfxg = False
   Else
     If List1.ListIndex <> -1 Then
       ii = ii + 1
       ReDim Preserve wdxy(1 To ii)
      For j = ii To List1.ListIndex + 2 Step -1
        wdxy(j).Name = wdxy(j - 1).Name
        wdxy(j).X = wdxy(j - 1).X
        wdxy(j).Y = wdxy(j - 1).Y
      Next j
      wdxy(List1.ListIndex + 1).X = CSng(Text1.Text)
      wdxy(List1.ListIndex + 1).Y = CSng(Text2.Text)
      wdxy(List1.ListIndex + 1).Name = Text3.Text
        List1.Clear
        Call Form_Load
        Text1.Text = ""
        Text2.Text = ""
        Text3.Text = ""
     Else
        ii = ii + 1
        ReDim Preserve wdxy(1 To ii)
        wdxy(ii).X = CSng(Text1.Text)
        wdxy(ii).Y = CSng(Text2.Text)
        wdxy(ii).Name = Text3.Text
        List1.AddItem (Format(ii, "0000") & Space(6) & wdxy(ii).Name & Space(3) & Format(wdxy(ii).X, "#.000") & Space(3) & Format(wdxy(ii).Y, "#.000"))
      Text1.Text = ""
        Text2.Text = ""
        Text3.Text = ""
      End If
   End If
End Sub
'删除点
Private Sub Command3_Click()
Dim F%
  If List1.ListIndex + 1 <> ii Then
       For F = List1.ListIndex + 1 To ii - 1
         wdxy(F).Name = wdxy(F + 1).Name
         wdxy(F).X = wdxy(F + 1).X
         wdxy(F).Y = wdxy(F + 1).Y
       Next F
       ii = ii - 1
     Else
       ii = ii - 1
     End If
     List1.RemoveItem (List1.ListIndex)
End Sub

Private Sub Form_Load()
 Dim i%
 For i = 1 To ii
   List1.AddItem (Format(i, "0000") & Space(6) & wdxy(i).Name & Space(3) & Format(wdxy(i).X, "#.000") & Space(3) & Format(wdxy(i).Y, "#.000"))
 Next i
End Sub

Private Sub List1_DblClick()
  Text1.Text = CStr(wdxy(List1.ListIndex + 1).X)
  Text2.Text = CStr(wdxy(List1.ListIndex + 1).Y)
  Text3.Text = wdxy(List1.ListIndex + 1).Name
  sfxg = True
End Sub

⌨️ 快捷键说明

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