No, I created a gradient User Control with this code.
My User Control's soul purpose is to allow alphablending into objects. Some alphablending code would bee down there:VB Code:
Private Sub Gradiate(ByVal color1 As Color, ByVal color2 As Color, ByVal mode As System.Drawing.Drawing2D.LinearGradientMode) Dim ghcs As Graphics = Me.CreateGraphics Dim brush As New System.Drawing.Drawing2D.LinearGradientBrush(New RectangleF(0, 0, Me.Width, Me.Height), color1, color2, mode) ghcs.FillRectangle(brush, New RectangleF(0, 0, Me.Width, Me.Height)) ghcs.Dispose() End Sub
Now my whole point here is to let the child control alphablend with my User Control's gradient. What do I end up with? I end up alphablending with my User Control's BackColor. I want it to alphablend with my gradient. Is there any way to do this?VB Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Label1.BackColor = Color.FromArgb(100, 255, 255, 255) End Sub




Reply With Quote