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

📄 frminputboxex.frm

📁 This application provides much functionality for creating data-driven reports, including preview, gr
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmInputBoxEx 
   BorderStyle     =   3  'Fixed Dialog
   ClientHeight    =   1980
   ClientLeft      =   45
   ClientTop       =   45
   ClientWidth     =   5505
   ControlBox      =   0   'False
   ForeColor       =   &H00000000&
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1980
   ScaleWidth      =   5505
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox txtInputValue 
      Height          =   270
      Left            =   67
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   1680
      Width           =   5370
   End
   Begin VB.CommandButton btn 
      Height          =   345
      Index           =   2
      Left            =   4320
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   765
      Width           =   1140
   End
   Begin VB.CommandButton btn 
      Height          =   345
      Index           =   1
      Left            =   4320
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   360
      Width           =   1140
   End
   Begin VB.Image Image4 
      Height          =   225
      Left            =   2700
      Picture         =   "frmInputBoxEx.frx":0000
      Top             =   0
      Width           =   255
   End
   Begin VB.Label Label1 
      BackColor       =   &H80000002&
      Caption         =   "Label1"
      ForeColor       =   &H80000009&
      Height          =   240
      Left            =   0
      TabIndex        =   3
      Top             =   5
      Width           =   810
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "Label2"
      Height          =   1170
      Left            =   105
      TabIndex        =   4
      Top             =   360
      Width           =   4100
   End
End
Attribute VB_Name = "frmInputBoxEx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long

Private Const WM_NCLBUTTONDOWN& = &HA1
Private Const HTCAPTION& = 2

Private fButton As String, hw As Long


Private Sub btn_Click(Index As Integer)
    If Index = 1 Then
        If txtInputValue.Text <> vbNullString Then
            fButton = txtInputValue.Text
        Else
            fButton = txtInputValue.Tag
        End If
    Else
        fButton = txtInputValue.Tag
    End If
    Me.Hide
End Sub

Private Sub Form_Load()
    hw = Me.hWnd
End Sub

Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = vbLeftButton Then
        ReleaseCapture
        Call SendMessage(hw, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
    End If
End Sub

Public Property Get getRetVal() As String
    getRetVal = fButton
End Property

Private Sub txtInputValue_GotFocus()
    On Error Resume Next

    With txtInputValue
        .SelStart = 0
        .SelLength = Len(.Text)
    End With
End Sub

⌨️ 快捷键说明

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