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

📄 form1.vb

📁 <Visual Basic 数据库开发实例精粹(第二版)>一书首先介绍了Visual Basic(简称VB)开发的技巧和重点技术
💻 VB
📖 第 1 页 / 共 2 页
字号:
    Me.cmdQuery.Text = "查询(&Q)"
    '
    'cmdReturn
    '
    Me.cmdReturn.BackColor = System.Drawing.Color.White
    Me.cmdReturn.Cursor = System.Windows.Forms.Cursors.Default
    Me.cmdReturn.ForeColor = System.Drawing.SystemColors.ControlText
    Me.cmdReturn.Location = New System.Drawing.Point(648, 392)
    Me.cmdReturn.Name = "cmdReturn"
    Me.cmdReturn.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.cmdReturn.Size = New System.Drawing.Size(76, 23)
    Me.cmdReturn.TabIndex = 60
    Me.cmdReturn.Text = "返回(&R)"
    '
    'chkDeptSend
    '
    Me.chkDeptSend.BackColor = System.Drawing.Color.White
    Me.chkDeptSend.Cursor = System.Windows.Forms.Cursors.Default
    Me.chkDeptSend.ForeColor = System.Drawing.SystemColors.ControlText
    Me.chkDeptSend.Location = New System.Drawing.Point(552, 56)
    Me.chkDeptSend.Name = "chkDeptSend"
    Me.chkDeptSend.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.chkDeptSend.Size = New System.Drawing.Size(181, 21)
    Me.chkDeptSend.TabIndex = 52
    Me.chkDeptSend.Text = "发件部门:"
    '
    'cboDeptReceive
    '
    Me.cboDeptReceive.BackColor = System.Drawing.SystemColors.Window
    Me.cboDeptReceive.Cursor = System.Windows.Forms.Cursors.Default
    Me.cboDeptReceive.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
    Me.cboDeptReceive.Enabled = False
    Me.cboDeptReceive.ForeColor = System.Drawing.SystemColors.WindowText
    Me.cboDeptReceive.Location = New System.Drawing.Point(552, 128)
    Me.cboDeptReceive.Name = "cboDeptReceive"
    Me.cboDeptReceive.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.cboDeptReceive.Size = New System.Drawing.Size(215, 20)
    Me.cboDeptReceive.TabIndex = 55
    '
    'chkDeptReceive
    '
    Me.chkDeptReceive.BackColor = System.Drawing.Color.White
    Me.chkDeptReceive.Cursor = System.Windows.Forms.Cursors.Default
    Me.chkDeptReceive.ForeColor = System.Drawing.SystemColors.ControlText
    Me.chkDeptReceive.Location = New System.Drawing.Point(552, 104)
    Me.chkDeptReceive.Name = "chkDeptReceive"
    Me.chkDeptReceive.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.chkDeptReceive.Size = New System.Drawing.Size(181, 20)
    Me.chkDeptReceive.TabIndex = 54
    Me.chkDeptReceive.Text = "收件部门:"
    '
    'chkAddresser
    '
    Me.chkAddresser.BackColor = System.Drawing.Color.White
    Me.chkAddresser.Cursor = System.Windows.Forms.Cursors.Default
    Me.chkAddresser.ForeColor = System.Drawing.SystemColors.ControlText
    Me.chkAddresser.Location = New System.Drawing.Point(552, 152)
    Me.chkAddresser.Name = "chkAddresser"
    Me.chkAddresser.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.chkAddresser.Size = New System.Drawing.Size(181, 21)
    Me.chkAddresser.TabIndex = 56
    Me.chkAddresser.Text = "发件人:"
    '
    '_txt_6
    '
    Me._txt_6.AcceptsReturn = True
    Me._txt_6.AutoSize = False
    Me._txt_6.BackColor = System.Drawing.SystemColors.Window
    Me._txt_6.Cursor = System.Windows.Forms.Cursors.IBeam
    Me._txt_6.Enabled = False
    Me._txt_6.ForeColor = System.Drawing.SystemColors.WindowText
    Me._txt_6.Location = New System.Drawing.Point(552, 176)
    Me._txt_6.MaxLength = 0
    Me._txt_6.Name = "_txt_6"
    Me._txt_6.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me._txt_6.Size = New System.Drawing.Size(215, 19)
    Me._txt_6.TabIndex = 57
    Me._txt_6.Text = ""
    '
    'cboDeptSend
    '
    Me.cboDeptSend.BackColor = System.Drawing.SystemColors.Window
    Me.cboDeptSend.Cursor = System.Windows.Forms.Cursors.Default
    Me.cboDeptSend.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
    Me.cboDeptSend.Enabled = False
    Me.cboDeptSend.ForeColor = System.Drawing.SystemColors.WindowText
    Me.cboDeptSend.Location = New System.Drawing.Point(552, 80)
    Me.cboDeptSend.Name = "cboDeptSend"
    Me.cboDeptSend.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.cboDeptSend.Size = New System.Drawing.Size(215, 20)
    Me.cboDeptSend.TabIndex = 53
    '
    'Label4
    '
    Me.Label4.AutoSize = True
    Me.Label4.BackColor = System.Drawing.Color.Transparent
    Me.Label4.Cursor = System.Windows.Forms.Cursors.Default
    Me.Label4.ForeColor = System.Drawing.SystemColors.ControlText
    Me.Label4.Location = New System.Drawing.Point(552, 32)
    Me.Label4.Name = "Label4"
    Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.Label4.Size = New System.Drawing.Size(103, 17)
    Me.Label4.TabIndex = 58
    Me.Label4.Text = "请选择查询条件:"
    '
    'TextBox1
    '
    Me.TextBox1.AcceptsReturn = True
    Me.TextBox1.AutoSize = False
    Me.TextBox1.BackColor = System.Drawing.SystemColors.Window
    Me.TextBox1.Cursor = System.Windows.Forms.Cursors.IBeam
    Me.TextBox1.Enabled = False
    Me.TextBox1.ForeColor = System.Drawing.SystemColors.WindowText
    Me.TextBox1.Location = New System.Drawing.Point(552, 232)
    Me.TextBox1.MaxLength = 0
    Me.TextBox1.Name = "TextBox1"
    Me.TextBox1.RightToLeft = System.Windows.Forms.RightToLeft.No
    Me.TextBox1.Size = New System.Drawing.Size(215, 19)
    Me.TextBox1.TabIndex = 64
    Me.TextBox1.Text = ""
    '
    'Form1
    '
    Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
    Me.ClientSize = New System.Drawing.Size(882, 440)
    Me.Controls.Add(Me.CheckBox1)
    Me.Controls.Add(Me._lbl_4)
    Me.Controls.Add(Me._lbl_3)
    Me.Controls.Add(Me.cmdQuery)
    Me.Controls.Add(Me.cmdReturn)
    Me.Controls.Add(Me.chkDeptSend)
    Me.Controls.Add(Me.cboDeptReceive)
    Me.Controls.Add(Me.chkDeptReceive)
    Me.Controls.Add(Me.chkAddresser)
    Me.Controls.Add(Me._txt_6)
    Me.Controls.Add(Me.cboDeptSend)
    Me.Controls.Add(Me.Label4)
    Me.Controls.Add(Me.TextBox1)
    Me.Controls.Add(Me.labContent)
    Me.Controls.Add(Me.labProcLimitTime)
    Me.Controls.Add(Me.labSendTime)
    Me.Controls.Add(Me.labAddresserTel)
    Me.Controls.Add(Me.labAddresser)
    Me.Controls.Add(Me.labDept)
    Me.Controls.Add(Me.GroupBox1)
    Me.Controls.Add(Me.Splitter1)
    Me.Controls.Add(Me.Button2)
    Me.Controls.Add(Me.Button1)
    Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
    Me.Menu = Me.MainMenu1
    Me.Name = "Form1"
    Me.Text = "Form1"
    Me.GroupBox1.ResumeLayout(False)
    Me.ResumeLayout(False)

  End Sub

#End Region

  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    m_Left = Screen.PrimaryScreen.WorkingArea.Right - Me.Width
    m_Top = Screen.PrimaryScreen.WorkingArea.Height
    m_Height = Me.Height

    Me.Left = m_Left
    Me.Height = 1
    m_Top -= Me.Height
    Me.Top = m_Top

    Timer1.Enabled = True
    Me.TopMost = True
    Dim rect As New Rectangle
    rect = Screen.PrimaryScreen.WorkingArea
    'Me.SetDisplayRectLocation(rect.X, _
    '    rect.Y) ', _
    'rect.Width, _
    'rect.Height)


  End Sub


  Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    m_Top -= 3

    'Me.Activate()
    Me.Top = m_Top
    Me.Height += 3
    If (Me.Height >= m_Height) Then
      Timer1.Enabled = False
    End If
    'If Me.Top + Me.Height < Screen.PrimaryScreen.WorkingArea.Bottom Then
    'Timer1.Enabled = False
    'End If
  End Sub

  Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    '  traymsg.CreateWnd(8, 100, 6)
    '  traymsg.ShowWnd(False, 10)
  End Sub


  Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Click

  End Sub

  Private Sub Splitter2_SplitterMoved(ByVal sender As System.Object, ByVal e As System.Windows.Forms.SplitterEventArgs) Handles Splitter2.SplitterMoved
    GroupBox1.Left = e.X
  End Sub

  Private Sub Splitter2_SplitterMoving(ByVal sender As System.Object, ByVal e As System.Windows.Forms.SplitterEventArgs) Handles Splitter2.SplitterMoving
    GroupBox1.Left = e.X
  End Sub

  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

  End Sub

  Private Sub Form1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.LostFocus
    'Me.Activate()
  End Sub

  Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
    Dim pen As New System.Drawing.Pen(System.Drawing.Color.BlueViolet)
    Dim rect As New System.Drawing.Rectangle

    Dim col, col2 As System.Drawing.Color

    col = System.Drawing.Color.FromArgb(80, 140, 250)
    col = System.Drawing.Color.Black
    col2 = System.Drawing.Color.White

    rect = System.Drawing.Rectangle.FromLTRB(0, 0, Me.Width, Me.Height)



    Dim pt1 As New System.Drawing.Point
    Dim pt2 As New System.Drawing.Point
    pt1.X = 0
    pt1.Y = 0
    pt2.X = 0
    pt2.Y = Me.Height

    Dim lnBrush As New System.Drawing.Drawing2D.LinearGradientBrush(rect, col, col2, Drawing.Drawing2D.LinearGradientMode.Vertical)
    Dim lnBrush2 As New System.Drawing.Drawing2D.LinearGradientBrush(pt1, pt2, col, col2)

    e.Graphics.FillRectangle(lnBrush2, rect)

  End Sub
End Class

⌨️ 快捷键说明

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