ARTICLE

Circular Form in VB.NET

Posted by Vishal Kulkarni Articles | Visual Basic 2010 May 18, 2004
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.
Download Files:
 
Reader Level:

Description:

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.

Procedure:

On running this code a circular form appears. By right clicking on it you can exit the application.

API Description.

'The CreateEllipticRgn function creates an elliptical region
Public Shared Function <DllImport("gdi32")> _
CreateEllipticRgn(
ByVal X1 As Integer, _
ByVal Y1 As Integer, _
ByVal X2 As Integer, _
ByVal Y2 As Integer) As Integer
End Function
'The SetWindowRgn 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
Public Shared Function <DllImport("user32")> _
SetWindowRgn(
ByVal hWnd As Integer, _
ByVal hRgn As Integer, _
ByVal bRedraw As Integer) As Integer
End Function

Login to add your contents and source code to this article
share this article :
post comment
 

sir ,how can i create a report through crystal wih value passing through form's textbox pls. send the code.

Posted by satish jha Jun 04, 2007

ok

Posted by satish jha Jun 04, 2007

Hello sir , i want to know how can i add record,delete record and modify record through data grid in database.

Posted by satish jha Jun 04, 2007

You have misspelled the code: . It should read: .

Posted by Soumya May 31, 2007

 sir it shows an error

       error name=identifier expected

  in <diiimport("gdi32")><--- here it shows error such as identifier expected

Posted by Ashok kumar Dec 27, 2006
Nevron Diagram
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Become a Sponsor