Wie funktioniert das Abrunden einer Form?

  • VB.NET

Es gibt 3 Antworten in diesem Thema. Der letzte Beitrag () ist von xXMichaelXx.

    Wie funktioniert das Abrunden einer Form?

    hay ich hab mal ne frage im punkt form abrunden:
    wie funktioniert das abrunden der form?
    hab diesen code mal irgendwo gefunden allerdings nie in die txt datei geschrieben wie man dein einsetzt:

    VB.NET-Quellcode

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


    weiß das einer?

    danke schonmal