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

📄 movepar.frm

📁 用VB6.0MapINfo绘等值线及表面图
💻 FRM
📖 第 1 页 / 共 3 页
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form MovePar 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "绘等值线/表面图参数"
   ClientHeight    =   5784
   ClientLeft      =   48
   ClientTop       =   336
   ClientWidth     =   8880
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   11.4
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "MovePar.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   482
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   740
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.PictureBox PictureContou1 
      Appearance      =   0  'Flat
      BackColor       =   &H80000000&
      ForeColor       =   &H80000008&
      Height          =   5532
      Left            =   120
      ScaleHeight     =   5508
      ScaleWidth      =   8628
      TabIndex        =   0
      Top             =   120
      Width           =   8652
      Begin VB.CommandButton CommandContouMarkInit 
         Caption         =   "连续颜色"
         Height          =   375
         Left            =   5904
         MousePointer    =   1  'Arrow
         TabIndex        =   19
         Top             =   1080
         Width           =   1335
      End
      Begin VB.PictureBox Picture2 
         Appearance      =   0  'Flat
         BackColor       =   &H80000000&
         ForeColor       =   &H80000008&
         Height          =   852
         Left            =   120
         ScaleHeight     =   828
         ScaleWidth      =   8388
         TabIndex        =   12
         Top             =   120
         Width           =   8412
         Begin VB.OptionButton OptionContou 
            Caption         =   "3D图"
            Height          =   375
            Index           =   5
            Left            =   6600
            MousePointer    =   1  'Arrow
            TabIndex        =   18
            Top             =   480
            Width           =   1572
         End
         Begin VB.OptionButton OptionContou 
            Caption         =   "点位图"
            Height          =   375
            Index           =   4
            Left            =   3360
            MousePointer    =   1  'Arrow
            TabIndex        =   17
            Top             =   480
            Width           =   1572
         End
         Begin VB.OptionButton OptionContou 
            Caption         =   "色块图"
            Height          =   375
            Index           =   3
            Left            =   120
            MousePointer    =   1  'Arrow
            TabIndex        =   16
            Top             =   480
            Width           =   1695
         End
         Begin VB.OptionButton OptionContou 
            Caption         =   "平面等值线"
            Height          =   375
            Index           =   0
            Left            =   120
            MousePointer    =   1  'Arrow
            TabIndex        =   15
            Top             =   120
            Width           =   1695
         End
         Begin VB.OptionButton OptionContou 
            Caption         =   "网状表面图"
            Enabled         =   0   'False
            Height          =   375
            Index           =   2
            Left            =   6600
            MousePointer    =   1  'Arrow
            TabIndex        =   14
            Top             =   120
            Value           =   -1  'True
            Width           =   1572
         End
         Begin VB.OptionButton OptionContou 
            Caption         =   "立体等值线"
            Enabled         =   0   'False
            Height          =   375
            Index           =   1
            Left            =   3360
            MousePointer    =   1  'Arrow
            TabIndex        =   13
            Top             =   120
            Width           =   1455
         End
      End
      Begin VB.CommandButton CommandConTouNo 
         Caption         =   "No"
         Enabled         =   0   'False
         Height          =   375
         Left            =   120
         TabIndex        =   10
         Top             =   1080
         Width           =   495
      End
      Begin VB.CommandButton CommandContouValue 
         Caption         =   "等值线值…"
         Enabled         =   0   'False
         Height          =   375
         Left            =   600
         MousePointer    =   1  'Arrow
         TabIndex        =   9
         Top             =   1080
         Width           =   1335
      End
      Begin VB.CommandButton CommandContouFill 
         Caption         =   "填充颜色…"
         Height          =   375
         Left            =   1920
         MousePointer    =   1  'Arrow
         TabIndex        =   8
         Top             =   1080
         Width           =   1335
      End
      Begin VB.CommandButton CommandContouMark 
         Caption         =   "画线标注…"
         Enabled         =   0   'False
         Height          =   375
         Left            =   4572
         MousePointer    =   1  'Arrow
         TabIndex        =   7
         Top             =   1080
         Width           =   1335
      End
      Begin VB.CommandButton Command3D 
         Caption         =   "视角参数…"
         Height          =   375
         Left            =   7236
         MousePointer    =   1  'Arrow
         TabIndex        =   6
         Top             =   1080
         Width           =   1335
      End
      Begin VB.CommandButton CommandContouFillInit 
         Caption         =   "连续颜色"
         Height          =   375
         Left            =   3240
         MousePointer    =   1  'Arrow
         TabIndex        =   5
         Top             =   1080
         Width           =   1335
      End
      Begin VB.CommandButton CommandCurCancel 
         Caption         =   "放弃"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   11.4
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   7320
         MousePointer    =   1  'Arrow
         TabIndex        =   4
         Top             =   4920
         Width           =   1212
      End
      Begin VB.CommandButton CommandAll 
         Caption         =   "确定"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   120
         MousePointer    =   1  'Arrow
         TabIndex        =   3
         Top             =   4920
         Width           =   1212
      End
      Begin VB.CommandButton CommandDelete 
         Caption         =   "删除"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   2400
         MousePointer    =   1  'Arrow
         TabIndex        =   2
         Top             =   4920
         Width           =   1212
      End
      Begin VB.CommandButton CommandAdd 
         Caption         =   "插入"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   5040
         MousePointer    =   1  'Arrow
         TabIndex        =   1
         Top             =   4920
         Width           =   1212
      End
      Begin MSFlexGridLib.MSFlexGrid MSFlexGridContou 
         Height          =   3252
         Left            =   120
         TabIndex        =   11
         Top             =   1440
         Width           =   8436
         _ExtentX        =   14880
         _ExtentY        =   5736
         _Version        =   393216
         Rows            =   4
         Cols            =   6
         FixedRows       =   0
         AllowBigSelection=   0   'False
         Enabled         =   0   'False
         FocusRect       =   2
         MousePointer    =   1
         FormatString    =   """^  |^  |^  |^  """
      End
   End
End
Attribute VB_Name = "MovePar"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command3D_Click()
    FrmMesh.Show 1
    ''bClick = False
    ''StrCommand = "视角参数"
    ''Parame.Show 1
    ''DoEvents
    ''bClick = True
End Sub

Private Sub CommandAdd_Click()
    Dim I As Integer, Row As Integer
    Dim V1 As Double, V2 As Double, V As Double
    Dim R1 As Single, G1 As Single, B1 As Single
    Dim R2 As Single, G2 As Single, B2 As Single
    Dim R As Single, G As Single, B As Single
    
    Row = MSFlexGridContou.Row

    If (Row < Vn) Then
        V1 = ParFill(IndexMove, Row).value
        V2 = ParFill(IndexMove, Row + 1).value
        V = (V1 + V2) / 2
            
        Call RGBtoR_G_B(ParFill(IndexMove, Row).FillColor, R1, G1, B1)
        Call RGBtoR_G_B(ParFill(IndexMove, Row + 1).FillColor, R2, G2, B2)
        
        R = (R1 + R2) / 2
        G = (G1 + G2) / 2
        B = (B1 + B2) / 2
        
        For I = Vn To Row + 1 Step -1
            ParFill(IndexMove, I + 1) = ParFill(IndexMove, I)
        Next I
    Else
        V1 = ParFill(IndexMove, Vn - 1).value
        V2 = ParFill(IndexMove, Vn).value
        V = V2 + (V2 - V1) / 2
        
        Call RGBtoR_G_B(ParFill(IndexMove, Vn - 1).FillColor, R1, G1, B1)
        Call RGBtoR_G_B(ParFill(IndexMove, Vn).FillColor, R2, G2, B2)
        
        R = R2 + (R2 - R1) / 2
        G = G2 + (G2 - G1) / 2
        B = B2 + (B2 - B1) / 2
    End If

    ParFill(IndexMove, Row + 1) = ParFill(IndexMove, Row)
    ParFill(IndexMove, Row + 1).value = Val(Format(V, FMT))
    
    If (R < 0) Then R = 0
    If (R > 255) Then R = 255
    If (G < 0) Then G = 0
    If (G > 255) Then G = 255
    If (B < 0) Then B = 0
    If (B > 255) Then B = 255
    
    ParFill(IndexMove, Row + 1).FillColor = RGB(R, G, B)
    
    Vn = Vn + 1

⌨️ 快捷键说明

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