Circular Form in VB.NET
This piece of code changes the looks of a normal VB form. It executes two API calls and changes the shape of the rectangular form to a Circular form.
This piece of code changes the looks of a normal VB form. It executes
two API calls and changes the shape of the rectangular form to a Circular form.
This circular form can be used as a splash form where user gets a feel of the
good looks of the software. You can modify the code to use it for various shapes
and sizes. You can also restrict the user from using the ctrl+ spacebar to exit
by using the borderstyle property. This code is a demonstration of the following
two APIs, which are used in VB6.
On running this code a circular form appears. By right clicking on it
you can exit the application.
CreateEllipticRgn function creates an elliptical region
Function <DllImport("gdi32")> _
ByVal Y1 As Integer, _
ByVal X2 As Integer, _
ByVal Y2 As Integer) As Integer
function sets the window region of a window. The window 'region determines the
area within the window where the system permits drawing. 'The system does not
display any portion of a window that lies outside of the 'window region
Function <DllImport("user32")> _
As Integer, _
Vishal Kulkarni presently working with E-Forum systems Pvt. Ltd. in Nagpur, India. He is working as a software developer. His fields of expertise are VB 6.0, VB.NET, ASP, ASP.NET, COM/DCOM, XML, XSL, ...