Rahmen der Form - Farbe ändern

  • VB.NET

Es gibt 1 Antwort in diesem Thema. Der letzte Beitrag () ist von TG22997.

    Bastel dir doch eine eigene Form.
    Am besten eine runde hier der Code:
    Der Code kommt nach Form_Load

    VB.NET-Quellcode

    1. Sub abrunden(ByVal was As Object, _
    2. ByVal x As Integer, ByVal y As Integer, _
    3. ByVal width As Integer, ByVal height As Integer, _
    4. ByVal radius As Integer)
    5. Dim gp As System.Drawing.Drawing2D.GraphicsPath = _
    6. New System.Drawing.Drawing2D.GraphicsPath()
    7. gp.AddLine(x + radius, y, x + width - radius, y)
    8. gp.AddArc(x + width - radius, y, radius, radius, 270, 90)
    9. gp.AddLine(x + width, y + radius, x + width, y + height - radius)
    10. gp.AddArc(x + width - radius, y + height - radius, radius, radius, 0, 90)
    11. gp.AddLine(x + width - radius, y + height, x + radius, y + height)
    12. gp.AddArc(x, y + height - radius, radius, radius, 90, 90)
    13. gp.AddLine(x, y + height - radius, x, y + radius)
    14. gp.AddArc(x, y, radius, radius, 180, 90)
    15. gp.CloseFigure()
    16. was.region = New System.Drawing.Region(gp)
    17. gp.Dispose()
    18. End Sub


    Der Code kommt in Form_load:

    VB.NET-Quellcode

    1. abrunden(Me, 0, 0, Me.Width, Me.Height, 10)