Hi
I am developing a template editor using VB.NET
The main bulk of the program is custom control called DBLPanel which simply inherits from a Panel control and allowed Double Buffering.
the program basically allows the user to select Text or Graphics and then prompts them for either Text or an Image and places them on the panel. The control is then added to a custom class which allows the user to resize by using handles and move the new control where they like on the panel.
This works fine but the controls ( particularly images ) need to be able to overlap each other and this is where it's falling over. Because VB.NET doesn't support true transparency and if you use a transparent window doesn't support double buffering the controls flicker all over the place and it really does look bad.
Im having similar problems with the label because the only way of creating transparent labels that can overlap is to draw the string manually and I need to retain some of the features such as wrapping and auto ellipsis.
Ive not been using .NET for that long but I find the lack of transparency and the fact controls are by default not double buffered a HUGE step back particularly when doing animation effects when compared to say VB6 and I cant see they have done anything about it in the last 6 years. Anybody know a more effective way of doing this or label controls that support transparancy.
Regards
I am developing a template editor using VB.NET
The main bulk of the program is custom control called DBLPanel which simply inherits from a Panel control and allowed Double Buffering.
VB.NET:
Public Class dblPanel
Inherits Panel
Public Sub New()
Me.DoubleBuffered = True
End Sub
End Class
the program basically allows the user to select Text or Graphics and then prompts them for either Text or an Image and places them on the panel. The control is then added to a custom class which allows the user to resize by using handles and move the new control where they like on the panel.
This works fine but the controls ( particularly images ) need to be able to overlap each other and this is where it's falling over. Because VB.NET doesn't support true transparency and if you use a transparent window doesn't support double buffering the controls flicker all over the place and it really does look bad.
VB.NET:
Public Class ImageEX
Inherits UserControl
Protected Overloads Overrides ReadOnly Property CreateParams() As CreateParams
Get
Dim cp As CreateParams = MyBase.CreateParams
cp.ExStyle = cp.ExStyle Or 32
Return cp
End Get
End Property
Protected Overloads Overrides Sub OnPaintBackground(ByVal e As PaintEventArgs)
End Sub
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
If Not MyBase.BackgroundImage Is Nothing Then
e.Graphics.DrawImage(MyBase.BackgroundImage, 0, 0, Me.Width, Me.Height)
End If
MyBase.OnPaint(e)
End Sub
End Class
Im having similar problems with the label because the only way of creating transparent labels that can overlap is to draw the string manually and I need to retain some of the features such as wrapping and auto ellipsis.
Ive not been using .NET for that long but I find the lack of transparency and the fact controls are by default not double buffered a HUGE step back particularly when doing animation effects when compared to say VB6 and I cant see they have done anything about it in the last 6 years. Anybody know a more effective way of doing this or label controls that support transparancy.
Regards