bl双性强迫侵犯h_国产在线观看人成激情视频_蜜芽188_被诱拐的少孩全彩啪啪漫画

vb點虐 畫矩形 vb圓角矩形怎么畫

vb點虐 畫一個矩形圖片的代碼

g?=?Me.picDisplay.CreateGraphics

成都創新互聯公司是一家專注于成都網站設計、成都網站建設與策劃設計,阿里地區網站建設哪家好?成都創新互聯公司做網站,專注于網站建設十載,網設計領域的專業建站公司;建站業務涵蓋:阿里地區等地區。阿里地區做網站價格咨詢:18980820575

Dim?mybrush?As?Brush?=?New?SolidBrush(Map_Empty_Color)

Dim?rect2?As?System.Drawing.Rectangle?=?New?System.Drawing.Rectangle(0,?0,?Map_Width,?Map_Height)

g.FillRectangle(mybrush,?rect2)

在vb點虐 中,矩形只能從左向右畫么

對于VB來說,其實是無所謂左右的。它只是把參數傳遞給底層的繪圖接口而已。

對于底層接口來說,繪制矩形是可以有方向的。可以把四個參數對調就反過來了。

VB.NET我要用鼠標軌跡畫一個矩形框 然后選中控件。就像星際和魔獸爭霸里對部隊單位的選中一樣~等大神回答

這個類繼承自Panel,把它加到你的項目里面,先運行一下,然后從工具箱里把它拖到窗體上,然后再向里面添加其它控件就可以了,支持Shift加選,Alt減選

Imports?System.Linq

Imports?System.Collections

Public?Class?MyPanel

Inherits?Panel

'?選擇模式,相交還是包含

Enum?SelectMode

Intersects

Contains

End?Enum

Dim?down?As?New?Point(-1,?-1)

Dim?rect?As?Rectangle

Dim?selected?As?New?List(Of?Control)

Dim?editting?As?IEnumerable(Of?Control)

Dim?mode?As?SelectMode?=?SelectMode.Contains

Dim?shift,?alt?As?Boolean

Public?Sub?New()

Me.DoubleBuffered?=?True

End?Sub

Protected?Overrides?Sub?OnMouseDown(e?As?MouseEventArgs)

MyBase.OnMouseDown(e)

down?=?e.Location

editting?=?selected.ToArray().ToList()

OnMouseMove(e)

End?Sub

Protected?Overrides?Sub?OnMouseMove(e?As?MouseEventArgs)

MyBase.OnMouseMove(e)

If?e.Button?=?Windows.Forms.MouseButtons.Left?Then

Dim?loc?As?New?Point(Math.Min(down.X,?e.X),?Math.Min(down.Y,?e.Y))

Dim?size?As?New?Size(Math.Abs(down.X?-?e.X),?Math.Abs(down.Y?-?e.Y))

rect?=?New?Rectangle(loc,?size)

Dim?cs?As?New?List(Of?Control)

For?Each?c?In?Controls

cs.Add(c)

Next

Dim?a?=?cs.Where(Function(n?As?Control)?(mode?=?SelectMode.Contains?And?rect.Contains(n.Bounds))?Or?(mode?=?SelectMode.Intersects?And?rect.IntersectsWith(n.Bounds)))

If?shift?Then?editting?=?a.Union(selected)?Else?If?alt?Then?editting?=?selected.Except(a)?Else?editting?=?a

Invalidate()

End?If

End?Sub

Protected?Overrides?Sub?OnMouseUp(e?As?MouseEventArgs)

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.X??0)?Then?e.Graphics.DrawRectangle(New?Pen(Color.Gray)?With?{.DashStyle?=?Drawing2D.DashStyle.DashDot},?rect)

End?Sub

End?Class

網站欄目:vb點虐 畫矩形 vb圓角矩形怎么畫
文章轉載:http://vcdvsql.cn/article12/ddeipgc.html

成都網站建設公司_創新互聯,為您提供網站制作面包屑導航移動網站建設云服務器電子商務

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

h5響應式網站建設