VB.NET僞透明效果

Dim pointLeftSoure As New Point(Me.Left, Me.Top)
Dim pointLeftDestination As New Point(-1, -30)
Dim sizeBackImage As New Size(Me.Width, Me.Height)
Dim imgpnlLock As New Bitmap(Me.Width, Me.Height)
Dim brushes As New SolidBrush(Color.FromArgb(80, Color.Black))
Using g As Graphics = Graphics.FromImage(imgpnlLock)
    g.CopyFromScreen(pointLeftSoure, pointLeftDestination, sizeBackImage)
    g.FillRectangle(brushes, 0, 0, Me.Width, Me.Height)
    pnlEditor.BackgroundImage = imgpnlLock
    g.Dispose()
End Using

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章