正在阅读:VB.NET实现PhotoShop的流动选取框VB.NET实现PhotoShop的流动选取框

2004-04-08 10:11 出处:CSDN 作者:epoluodi 责任编辑:sdq

  'Windows 窗体设计器所必需的
      Private components As System.ComponentModel.IContainer

  '注意: 以下过程是 Windows 窗体设计器所必需的
     '可以使用 Windows 窗体设计器修改此过程。
     '不要使用代码编辑器修改它。
      Friend WithEvents Timer1 As System.Windows.Forms.Timer
      <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
          Me.components = New System.ComponentModel.Container
          Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
          '
          'Timer1
          '
          Me.Timer1.Enabled = True
          Me.Timer1.Interval = 50
          '
          'Form1
          '
          Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
          Me.ClientSize = New System.Drawing.Size(416, 166)
          Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
          Me.MaximizeBox = False
          Me.MinimizeBox = False
          Me.Name = "Form1"
          Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
          Me.Text = "Photo For VB.NET"
    End Sub
  #End Region

     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
         Me.Refresh()            '刷新窗口
     End Sub

    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
          pen.DashOffset = offset                 '设置偏移值
          e.Graphics.DrawPath(pen, GPath)         '画路径

    '改变偏移值的量
          offset += 1.0
          If offset / 100 = 1 Then
              offset = 0.0
          End If 
 
    End Sub

察看评论详细内容 我要发表评论
作者笔名 简短内容 发表时间
:

键盘也能翻页,试试“← →”键

相关文章

关注我们

最新资讯离线随时看 聊天吐槽赢奖品