Making irregular forms involves the invocation of APIs and a lot of programming, which is a very complicated matter. Below we can use Borland C # Builder to easily implement an irregular form, with an example to describe its production process.
I. Preparing irregular form bitmaps
Two. Setup of Forms
Three. Completion of the Code
I. Preparing irregular form bitmaps
For the sake of convenience, we look for a few other software skin.
Here, use the skins\ocean\kingdvd_disable.bmp in the installation directory of Jinshan shadow PA 2003.
Of course, you can use the drawing tool, make a bitmap with a shape, the background uses a special color, such as white. This color will be used in the back.
Two. Setup of Forms
1. New C # application
2. Select the newly created form and set its corresponding properties:
(1). Set the FormBorderStyle property to None.
(2). Set the BackgroundImage property of the form to the first bitmap file.
(3). Set the TransparencyKey property to the background color of the bitmap file, in this case white. (This property tells the application which parts of the form need to be set to transparent.) )
(4). Add a picturebox1, is a close bitmap, click on the application to close.
(5) Adding a contextMenu1, add a menu item "Exit" and set the WinForm ContextMenu to contextMenu1.
Press F9 to run your program and you'll see your irregular form.