Because for me this isn't solved - here is the codee to my posted solution (2) :
Imports System.ComponentModel
Public Class OpacForm
Inherits System.Windows.Forms.Form
Public Sub New()
Me.SetStyle(ControlStyles.Opaque, True)
Me.SetStyle(ControlStyles.OptimizedDoubleBuffer, False)
Me.SetStyle(ControlStyles.ResizeRedraw, True)
MyBase.FormBorderStyle = Windows.Forms.FormBorderStyle.None
End Sub
<designerserializationvisibility(designerserializationvisibility.hidden)>
<browsable(false),> _
Shadows Property FormBorderStyle As FormBorderStyle
<typeconverterattribute(gettype(opacityconverter))>
Shadows Property Opacity As Double
Get
Return my_Opacity / 255
End Get
Set(ByVal value As Double)
my_Opacity = value * 255
Me.Refresh()
End Set
End Property
Private my_Opacity As Integer = 255
Protected Overrides Sub OnPaint(ByVal pe As System.Windows.Forms.PaintEventArgs)
Dim gr As System.Drawing.Graphics = pe.Graphics
Dim myBrush As New SolidBrush(Color.FromArgb(my_Opacity, BackColor))
gr.FillRectangle(myBrush, 0, 0, Width, Height)
End Sub
End Class
This Form-Class must be inherited by the Form in which you want to use this Feature.
If you want to have any kind of Background it must also be created inside the OnPaint-method.