.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh
Melody Anderson
Eminent IT

Home >> Code Snippets >> Windows Form Controls >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Heart Shaped Form using Region Property in VB.Net

Posted By:Hefin Dsouza       Posted Date: April 27, 2009    Points: 10    Category: Windows Form Controls    URL: http://www.dotnetspark.com  

The Following code will chage the shape of the Form to a Heart Shape.Use the following code at the Load Event or at Button Click

        Dim path As New Drawing2D.GraphicsPath

        path.AddArc(70, 10, 150, 150, 135, 195)

        path.AddArc(200, 10, 150, 150, 210, 195)

        path.AddLine(92, 139, 210, 270)

        path.AddLine(327, 139, 210, 270)

        path.AddLine(327, 139, 92, 139)

        Me.Region = New Region(path)

Regards Hefin Dsouza


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend