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

📄 frmprompt.vb

📁 <Visual Basic 数据库开发实例精粹(第二版)>一书首先介绍了Visual Basic(简称VB)开发的技巧和重点技术
💻 VB
字号:

Enum PromptType
  SendMsg
  ReceiveMsg
End Enum

Friend Class frmPrompt
  Inherits System.Windows.Forms.Form
#Region "Windows 窗体设计器生成的代码"
  Public Sub New()
    MyBase.New()

    '该调用是 Windows 窗体设计器所必需的。
    InitializeComponent()

    '在 InitializeComponent() 调用之后添加任何初始化

  End Sub

  '窗体重写处置,以清理组件列表。
  Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
    If Disposing Then
      If Not components Is Nothing Then
        components.Dispose()
      End If
    End If
    MyBase.Dispose(Disposing)
  End Sub

  'Windows 窗体设计器所必需的
  Private components As System.ComponentModel.IContainer
  Public ToolTip1 As System.Windows.Forms.ToolTip
  '注意: 以下过程是 Windows 窗体设计器所必需的
  '可以使用 Windows 窗体设计器来修改它。
  '不要使用代码编辑器修改它。
  Public WithEvents labPrompt As System.Windows.Forms.Label
  <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    Me.components = New System.ComponentModel.Container
    Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
    Me.labPrompt = New System.Windows.Forms.Label
    Me.SuspendLayout()
    '
    'labPrompt
    '
    Me.labPrompt.BackColor = System.Drawing.SystemColors.Control
    Me.labPrompt.Cursor = System.Windows.Forms.Cursors.Default
    Me.labPrompt.ForeColor = System.Drawing.SystemColors.ControlText
    Me.labPrompt.Location = New System.Drawing.Point(0, 19)
    Me.labPrompt.Name = "labPrompt"
    Me.labPrompt.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.labPrompt.Size = New System.Drawing.Size(460, 14)
    Me.labPrompt.TabIndex = 0
    Me.labPrompt.Text = "请稍候,正在从服务器提取信息..."
    Me.labPrompt.TextAlign = System.Drawing.ContentAlignment.TopCenter
    '
    'frmPrompt
    '
    Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
    Me.BackColor = System.Drawing.SystemColors.Control
    Me.ClientSize = New System.Drawing.Size(459, 50)
    Me.ControlBox = False
    Me.Controls.Add(Me.labPrompt)
    Me.Cursor = System.Windows.Forms.Cursors.Default
    Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
    Me.Location = New System.Drawing.Point(3, 3)
    Me.MaximizeBox = False
    Me.MinimizeBox = False
    Me.Name = "frmPrompt"
    Me.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.ShowInTaskbar = False
    Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
    Me.ResumeLayout(False)

  End Sub
#End Region

  Public Sub SetPromptType(ByVal pt As PromptType)
    If pt = PromptType.SendMsg Then
      labPrompt.Text = "请稍候,正在发送信息......"
    ElseIf pt = PromptType.ReceiveMsg Then
      labPrompt.Text = "请稍候,正在从服务器提取信息......"
    End If
  End Sub

End Class

⌨️ 快捷键说明

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