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

📄 frmsendmsg3.vb

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

'发送信息窗体的状态
Enum SendMsgStatus
  Send
  Reply
  Broadcast
End Enum


Friend Class frmSendInfo
  Inherits System.Windows.Forms.Form

  Protected m_smsStat As SendMsgStatus = SendMsgStatus.Send
  Protected m_iDeptReplyId As Int16 = 0

#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
  Public WithEvents pic As System.Windows.Forms.Panel
  Public WithEvents cmdSend As System.Windows.Forms.Button
  Public WithEvents cmdCancel As System.Windows.Forms.Button
  Public WithEvents mnuSendInfo As System.Windows.Forms.MenuItem
  Public WithEvents ln1 As System.Windows.Forms.MenuItem
  Public WithEvents mnuReturn As System.Windows.Forms.MenuItem
  Public WithEvents mnuOperate As System.Windows.Forms.MenuItem
  Public WithEvents mnuHelpInfo As System.Windows.Forms.MenuItem
  Public WithEvents mnuHelp As System.Windows.Forms.MenuItem
  Public MainMenu1 As System.Windows.Forms.MainMenu
  '注意: 以下过程是 Windows 窗体设计器所必需的
  '可以使用 Windows 窗体设计器来修改它。
  '不要使用代码编辑器修改它。
  Public WithEvents txtReceiveDept As System.Windows.Forms.TextBox
  Public WithEvents txtSendDept As System.Windows.Forms.TextBox
  Public WithEvents labSendDept As System.Windows.Forms.Label
  Public WithEvents labAddresser As System.Windows.Forms.Label
  Public WithEvents labAddresserTel As System.Windows.Forms.Label
  Public WithEvents labLimitTime As System.Windows.Forms.Label
  Public WithEvents labContent As System.Windows.Forms.Label
  Public WithEvents labReceiveDept As System.Windows.Forms.Label
  Public WithEvents txtAddresser As System.Windows.Forms.TextBox
  Public WithEvents cmdSelectedClear As System.Windows.Forms.Button
  Public WithEvents cmdSelectedAll As System.Windows.Forms.Button
  Public WithEvents labReceiveList As System.Windows.Forms.Label
  Public WithEvents txtAddresserTel As System.Windows.Forms.TextBox
  Public WithEvents labTitle As System.Windows.Forms.Label
  Public WithEvents labTitle2 As System.Windows.Forms.Label
  Public WithEvents grpInput As System.Windows.Forms.GroupBox
  Public WithEvents grpDeptList As System.Windows.Forms.GroupBox
  Friend WithEvents lsvDept As System.Windows.Forms.ListView
  Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader
  Public WithEvents cboDept As System.Windows.Forms.ComboBox
  Friend WithEvents dptProcLimeTime As System.Windows.Forms.DateTimePicker
  Friend WithEvents rtxtContent As System.Windows.Forms.RichTextBox
  Friend WithEvents Panel1 As System.Windows.Forms.Panel
  Friend WithEvents cboFontName As System.Windows.Forms.ComboBox
  Friend WithEvents cboFontSize As System.Windows.Forms.ComboBox
  Friend WithEvents btnBold As System.Windows.Forms.Button
  Friend WithEvents btnItalic As System.Windows.Forms.Button
  Friend WithEvents btnUnderLine As System.Windows.Forms.Button
  Friend WithEvents btnColor As System.Windows.Forms.Button
  Friend WithEvents Panel2 As System.Windows.Forms.Panel
  <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmSendInfo))
    Me.pic = New System.Windows.Forms.Panel
    Me.labTitle = New System.Windows.Forms.Label
    Me.labTitle2 = New System.Windows.Forms.Label
    Me.grpInput = New System.Windows.Forms.GroupBox
    Me.Panel1 = New System.Windows.Forms.Panel
    Me.rtxtContent = New System.Windows.Forms.RichTextBox
    Me.Panel2 = New System.Windows.Forms.Panel
    Me.cboFontName = New System.Windows.Forms.ComboBox
    Me.cboFontSize = New System.Windows.Forms.ComboBox
    Me.btnColor = New System.Windows.Forms.Button
    Me.btnUnderLine = New System.Windows.Forms.Button
    Me.btnItalic = New System.Windows.Forms.Button
    Me.btnBold = New System.Windows.Forms.Button
    Me.dptProcLimeTime = New System.Windows.Forms.DateTimePicker
    Me.txtReceiveDept = New System.Windows.Forms.TextBox
    Me.cboDept = New System.Windows.Forms.ComboBox
    Me.txtSendDept = New System.Windows.Forms.TextBox
    Me.txtAddresser = New System.Windows.Forms.TextBox
    Me.txtAddresserTel = New System.Windows.Forms.TextBox
    Me.cmdSend = New System.Windows.Forms.Button
    Me.cmdCancel = New System.Windows.Forms.Button
    Me.labSendDept = New System.Windows.Forms.Label
    Me.labAddresser = New System.Windows.Forms.Label
    Me.labAddresserTel = New System.Windows.Forms.Label
    Me.labLimitTime = New System.Windows.Forms.Label
    Me.labContent = New System.Windows.Forms.Label
    Me.labReceiveDept = New System.Windows.Forms.Label
    Me.grpDeptList = New System.Windows.Forms.GroupBox
    Me.lsvDept = New System.Windows.Forms.ListView
    Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader
    Me.cmdSelectedClear = New System.Windows.Forms.Button
    Me.cmdSelectedAll = New System.Windows.Forms.Button
    Me.labReceiveList = New System.Windows.Forms.Label
    Me.MainMenu1 = New System.Windows.Forms.MainMenu
    Me.mnuOperate = New System.Windows.Forms.MenuItem
    Me.mnuSendInfo = New System.Windows.Forms.MenuItem
    Me.ln1 = New System.Windows.Forms.MenuItem
    Me.mnuReturn = New System.Windows.Forms.MenuItem
    Me.mnuHelp = New System.Windows.Forms.MenuItem
    Me.mnuHelpInfo = New System.Windows.Forms.MenuItem
    Me.pic.SuspendLayout()
    Me.grpInput.SuspendLayout()
    Me.Panel1.SuspendLayout()
    Me.Panel2.SuspendLayout()
    Me.grpDeptList.SuspendLayout()
    Me.SuspendLayout()
    '
    'pic
    '
    Me.pic.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
                Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
    Me.pic.BackColor = System.Drawing.Color.FromArgb(CType(128, Byte), CType(128, Byte), CType(128, Byte))
    Me.pic.Controls.Add(Me.labTitle)
    Me.pic.Controls.Add(Me.labTitle2)
    Me.pic.Cursor = System.Windows.Forms.Cursors.Default
    Me.pic.ForeColor = System.Drawing.SystemColors.WindowText
    Me.pic.Location = New System.Drawing.Point(0, 0)
    Me.pic.Name = "pic"
    Me.pic.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.pic.Size = New System.Drawing.Size(716, 24)
    Me.pic.TabIndex = 22
    Me.pic.TabStop = True
    '
    'labTitle
    '
    Me.labTitle.AutoSize = True
    Me.labTitle.BackColor = System.Drawing.Color.Transparent
    Me.labTitle.Cursor = System.Windows.Forms.Cursors.Default
    Me.labTitle.Font = New System.Drawing.Font("宋体", 10.5!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
    Me.labTitle.ForeColor = System.Drawing.Color.White
    Me.labTitle.Location = New System.Drawing.Point(10, 4)
    Me.labTitle.Name = "labTitle"
    Me.labTitle.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.labTitle.Size = New System.Drawing.Size(49, 19)
    Me.labTitle.TabIndex = 24
    Me.labTitle.Text = "新信息"
    '
    'labTitle2
    '
    Me.labTitle2.AutoSize = True
    Me.labTitle2.BackColor = System.Drawing.Color.Transparent
    Me.labTitle2.Cursor = System.Windows.Forms.Cursors.Default
    Me.labTitle2.Font = New System.Drawing.Font("宋体", 10.5!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
    Me.labTitle2.ForeColor = System.Drawing.SystemColors.ControlText
    Me.labTitle2.Location = New System.Drawing.Point(12, 6)
    Me.labTitle2.Name = "labTitle2"
    Me.labTitle2.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.labTitle2.Size = New System.Drawing.Size(49, 19)
    Me.labTitle2.TabIndex = 23
    Me.labTitle2.Text = "新信息"
    '
    'grpInput
    '
    Me.grpInput.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
                Or System.Windows.Forms.AnchorStyles.Left) _
                Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
    Me.grpInput.BackColor = System.Drawing.SystemColors.Control
    Me.grpInput.Controls.Add(Me.Panel1)
    Me.grpInput.Controls.Add(Me.dptProcLimeTime)
    Me.grpInput.Controls.Add(Me.txtReceiveDept)
    Me.grpInput.Controls.Add(Me.cboDept)
    Me.grpInput.Controls.Add(Me.txtSendDept)
    Me.grpInput.Controls.Add(Me.txtAddresser)
    Me.grpInput.Controls.Add(Me.txtAddresserTel)
    Me.grpInput.Controls.Add(Me.cmdSend)
    Me.grpInput.Controls.Add(Me.cmdCancel)
    Me.grpInput.Controls.Add(Me.labSendDept)
    Me.grpInput.Controls.Add(Me.labAddresser)
    Me.grpInput.Controls.Add(Me.labAddresserTel)
    Me.grpInput.Controls.Add(Me.labLimitTime)
    Me.grpInput.Controls.Add(Me.labContent)
    Me.grpInput.Controls.Add(Me.labReceiveDept)
    Me.grpInput.ForeColor = System.Drawing.SystemColors.ControlText
    Me.grpInput.Location = New System.Drawing.Point(0, 19)
    Me.grpInput.Name = "grpInput"
    Me.grpInput.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.grpInput.Size = New System.Drawing.Size(522, 396)
    Me.grpInput.TabIndex = 14
    Me.grpInput.TabStop = False
    '
    'Panel1
    '
    Me.Panel1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
                Or System.Windows.Forms.AnchorStyles.Left) _
                Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
    Me.Panel1.Controls.Add(Me.rtxtContent)
    Me.Panel1.Controls.Add(Me.Panel2)
    Me.Panel1.Location = New System.Drawing.Point(17, 154)
    Me.Panel1.Name = "Panel1"
    Me.Panel1.Size = New System.Drawing.Size(485, 182)
    Me.Panel1.TabIndex = 24
    '
    'rtxtContent
    '
    Me.rtxtContent.Dock = System.Windows.Forms.DockStyle.Fill
    Me.rtxtContent.Location = New System.Drawing.Point(0, 27)
    Me.rtxtContent.Name = "rtxtContent"
    Me.rtxtContent.Size = New System.Drawing.Size(485, 155)
    Me.rtxtContent.TabIndex = 23
    Me.rtxtContent.Text = "RichTextBox1"
    '
    'Panel2
    '
    Me.Panel2.Controls.Add(Me.cboFontName)
    Me.Panel2.Controls.Add(Me.cboFontSize)
    Me.Panel2.Controls.Add(Me.btnColor)
    Me.Panel2.Controls.Add(Me.btnUnderLine)
    Me.Panel2.Controls.Add(Me.btnItalic)
    Me.Panel2.Controls.Add(Me.btnBold)
    Me.Panel2.Dock = System.Windows.Forms.DockStyle.Top
    Me.Panel2.Location = New System.Drawing.Point(0, 0)
    Me.Panel2.Name = "Panel2"
    Me.Panel2.Size = New System.Drawing.Size(485, 27)
    Me.Panel2.TabIndex = 31
    '
    'cboFontName
    '
    Me.cboFontName.Location = New System.Drawing.Point(2, 2)
    Me.cboFontName.Name = "cboFontName"
    Me.cboFontName.Size = New System.Drawing.Size(128, 20)
    Me.cboFontName.TabIndex = 25
    Me.cboFontName.Text = "ComboBox1"
    '
    'cboFontSize
    '
    Me.cboFontSize.Location = New System.Drawing.Point(140, 2)
    Me.cboFontSize.Name = "cboFontSize"
    Me.cboFontSize.Size = New System.Drawing.Size(78, 20)
    Me.cboFontSize.TabIndex = 26
    Me.cboFontSize.Text = "ComboBox2"
    '
    'btnColor
    '
    Me.btnColor.FlatStyle = System.Windows.Forms.FlatStyle.Popup
    Me.btnColor.Image = CType(resources.GetObject("btnColor.Image"), System.Drawing.Image)
    Me.btnColor.Location = New System.Drawing.Point(324, 1)
    Me.btnColor.Name = "btnColor"
    Me.btnColor.Size = New System.Drawing.Size(22, 22)
    Me.btnColor.TabIndex = 30
    '
    'btnUnderLine
    '
    Me.btnUnderLine.FlatStyle = System.Windows.Forms.FlatStyle.Popup
    Me.btnUnderLine.Image = CType(resources.GetObject("btnUnderLine.Image"), System.Drawing.Image)
    Me.btnUnderLine.Location = New System.Drawing.Point(292, 1)
    Me.btnUnderLine.Name = "btnUnderLine"
    Me.btnUnderLine.Size = New System.Drawing.Size(22, 22)
    Me.btnUnderLine.TabIndex = 29
    '
    'btnItalic
    '
    Me.btnItalic.FlatStyle = System.Windows.Forms.FlatStyle.Popup
    Me.btnItalic.Image = CType(resources.GetObject("btnItalic.Image"), System.Drawing.Image)
    Me.btnItalic.Location = New System.Drawing.Point(260, 1)
    Me.btnItalic.Name = "btnItalic"
    Me.btnItalic.Size = New System.Drawing.Size(22, 22)

⌨️ 快捷键说明

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