Problem when putting tools on the form RRS feed

  • Question


    1- I created Form without Borders             Borders properties =   FixedSingle
    - I put 2buttons zoom in and  minimized  and also the 2buttons without Borders
    - The problem I have minimized the form and the tip was the tools moving or redrawn or by a clear jerk
    - What is the problem? There are no code in the interface other than zoom in and out

    2-This model was used to draw the
    GroupPanelBoxand the drawing is done but when another form is placed on the form it happens and it is re-drawn or moved or when minimized and maxmize

    - What is the problem?

    class draw grouppanelbox

    Class GroupPanelBox
        Inherits ThemeContainerControl
        Public Sub New()
        End Sub
        Public Overrides Sub PaintHook()
            Me.Font = New Font("Tahoma", 10, FontStyle.Regular)
            Me.ForeColor = Color.FromArgb(40, 40, 40)
            G.SmoothingMode = SmoothingMode.AntiAlias
            G.Clear(Color.FromArgb(255, 255, 255))
            G.FillRectangle(New SolidBrush(Color.FromArgb(50, 64, 78)), New Rectangle(0, 0, Width, 27))
            G.DrawLine(New Pen(Color.FromArgb(233, 238, 240)), 1, 1, Width - 2, 1)
            G.DrawRectangle(New Pen(Color.FromArgb(214, 214, 214)), 0, 1, Width - 1, Height)
            G.DrawRectangle(New Pen(Color.FromArgb(214, 214, 214)), 0, 0, Width - 1, 27)
            G.DrawString(Text, Font, New SolidBrush(Color.FromArgb(255, 255, 255)), 7, 6)
        End Sub
    End Class

    Sunday, April 8, 2018 7:03 PM

All replies

  • Hi monemas,

     What is ThemeContainerControl? it is custom control or other? Can you please describe more detailed info about this here?

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Tuesday, April 10, 2018 5:33 AM