MyBase.OnMouseUp(e)
down = New Point(-1, -1)
selected = editting.ToList()
editting = Nothing
Invalidate()
End Sub
Protected Overrides Function ProcessKeyPreview(ByRef m As Message) As Boolean
Dim KeyCode As Keys = CInt(m.WParam) And CInt(Keys.KeyCode)
Dim d As Boolean
If m.Msg = H100 Or m.Msg = H104 Then d = True Else If m.Msg = H101 Or m.Msg = H105 Then d = False Else Return MyBase.ProcessKeyPreview(m)
If KeyCode = Keys.ShiftKey Then
shift = d
ElseIf KeyCode = Keys.Menu Then
alt = d
End If
Return MyBase.ProcessKeyPreview(m)
End Function
Protected Overrides Sub OnPaint(e As PaintEventArgs)
MyBase.OnPaint(e)
For Each c As Control In IIf(editting Is Nothing, selected, editting)
e.Graphics.DrawRectangle(New Pen(Color.Gray) With {.DashStyle = Drawing2D.DashStyle.DashDot}, c.Left - 1, c.Top - 1, c.Width + 1, c.Height + 1)
Next
If (down.X0) Then e.Graphics.DrawRectangle(New Pen(Color.Gray) With {.DashStyle = Drawing2D.DashStyle.DashDot}, rect)
End Sub
End Class
vb.net选中图形的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于vbs编写图形窗口、vb.net选中图形的信息别忘了在本站进行查找喔 。
推荐阅读
- vueerp系统登录流程,vuex 登录
- 普通主板怎么支持2片显卡,普通主板怎么支持2片显卡的
- lol在网络游戏的排名,lol游戏排行
- 无人直播表演,无人直播播什么最吸引人
- 怎样把数据库导入php 如何将数据库导入
- 安卓视频如何调参数,安卓手机怎么调拍照参数
- flutter对话框,flutter对话框输入内容一直build
- 区块链创业与挑战答案,区块链技术创业
- php如何连接阿里数据库 php 数据库连接