Impossible clean PictureBox
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
1 post
Page 1 of 1
I stay using this class for the PictureBox background trasparent, but seems that if I want clean the PictureBox like = TrasparentPictureBox.Image = Nothing(), the image don't disappear and I obtain all new image overlapping to the previous. How can I fix this?
Code: Select all
Public Class TransparentPictureBox
Inherits PictureBox
Public Sub New()
Me.SetStyle(ControlStyles.Opaque, True)
Me.SetStyle(ControlStyles.OptimizedDoubleBuffer, False)
End Sub
Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams
Get
Dim cp As CreateParams = MyBase.CreateParams
cp.ExStyle = cp.ExStyle Or &H20 ' Turn on WS_EX_TRANSPARENT
Return cp
End Get
End Property
End Class
I'm in the empire business.
1 post
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023