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

📄 frmsetwidthheight.frm

📁 这是基于MapX4.0的房屋测绘管理信息系统
💻 FRM
字号:
VERSION 5.00
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
Begin VB.Form frmSetWidthHeight 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "设置宽度和高度"
   ClientHeight    =   2385
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   4065
   Icon            =   "frmSetWidthHeight.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2385
   ScaleWidth      =   4065
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.TextBox txtLocation 
      Height          =   345
      Left            =   750
      TabIndex        =   0
      Top             =   900
      Width           =   2925
   End
   Begin MSMask.MaskEdBox txtHeight 
      Height          =   330
      Left            =   750
      TabIndex        =   2
      Top             =   510
      Width           =   2925
      _ExtentX        =   5159
      _ExtentY        =   582
      _Version        =   393216
      PromptChar      =   "_"
   End
   Begin MSMask.MaskEdBox txtWidth 
      Height          =   330
      Left            =   750
      TabIndex        =   1
      Top             =   120
      Width           =   2925
      _ExtentX        =   5159
      _ExtentY        =   582
      _Version        =   393216
      PromptChar      =   "_"
   End
   Begin VB.CommandButton CancelButton 
      Cancel          =   -1  'True
      Caption         =   "取消(&C)"
      Height          =   405
      Left            =   2100
      TabIndex        =   4
      Top             =   1695
      Width           =   1215
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "确定(&O)"
      Default         =   -1  'True
      Height          =   405
      Left            =   690
      TabIndex        =   3
      Top             =   1695
      Width           =   1215
   End
   Begin VB.Label Label5 
      Caption         =   "座落"
      Height          =   285
      Left            =   330
      TabIndex        =   9
      Top             =   975
      Width           =   375
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "米"
      Height          =   180
      Left            =   3735
      TabIndex        =   8
      Top             =   585
      Width           =   180
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "米"
      Height          =   180
      Left            =   3735
      TabIndex        =   7
      Top             =   195
      Width           =   180
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "高度"
      Height          =   180
      Left            =   330
      TabIndex        =   6
      Top             =   585
      Width           =   360
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "宽度"
      Height          =   180
      Left            =   360
      TabIndex        =   5
      Top             =   195
      Width           =   360
   End
End
Attribute VB_Name = "frmSetWidthHeight"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mCanceled As Boolean
Dim mWidth As Double
Dim mHeight As Double
Dim mLocation As String
Private Sub CancelButton_Click()
    mCanceled = True
    Unload Me
End Sub
Private Sub Form_Load()
    txtWidth.Text = "400"
    txtHeight.Text = "300"
    mCanceled = True
End Sub

Private Sub OKButton_Click()
    On Error Resume Next
    If Not IsNumeric(txtWidth.Text) Then
        MsgBox "请输入数据!", vbOKOnly + vbInformation, Me.Caption
        txtWidth.SetFocus
        txtWidth.SelStart = 0
        txtWidth.SelLength = Len(txtWidth.Text)
        Exit Sub
    End If
    If Not IsNumeric(txtHeight.Text) Then
        MsgBox "请输入数据!", vbOKOnly + vbInformation, Me.Caption
        txtHeight.SetFocus
        txtHeight.SelStart = 0
        txtHeight.SelLength = Len(txtHeight.Text)
        Exit Sub
    End If
    If Len(Trim(txtLocation.Text)) = 0 Then
        MsgBox "请输入座落!", vbOKOnly + vbInformation, Me.Caption
        txtLocation.SetFocus
        Exit Sub
    End If
    '------------------------------------------------
    mWidth = CDbl(txtWidth.Text)
    mHeight = CDbl(txtHeight.Text)
    mLocation = txtLocation.Text
    '---------------------------------------
    mCanceled = False
    Unload Me
End Sub
Public Property Get IsCanceled() As Boolean
    IsCanceled = mCanceled
    Unload Me
End Property
Public Property Get MapWidth() As Double
    MapWidth = mWidth
End Property
Public Property Get MapHeight() As Double
    MapHeight = mHeight
End Property
Public Property Get MapLocation() As String
    MapLocation = mLocation
End Property
Public Property Let MapWidth(ByVal NewWidth As Double)
     mWidth = NewWidth
     txtWidth.Text = CStr(NewWidth)
End Property
Public Property Let MapHeight(ByVal NewHeight As Double)
     mHeight = NewHeight
     txtHeight.Text = CStr(NewHeight)
End Property

⌨️ 快捷键说明

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