The main part of the code can be found in the function CreateRegion which uses the API functions CreateRectRGN and CombineRGN to great affect. At design time it should look like the following image: I will not explain in detail how the code works because I think it will be easier to read the code and let the comments explain what is happening.Īs an overview on the form you should place a TImage and set its picture property to be the image that you would like the form to be shaped around. The clever part here is how the region is created. Like the previous tutorial it uses the SetWindowRGN function. This tutorial shows how to create a form that is shaped around a bitmap. We have already done a tutorial on how to create non-rectangular windows. This article comes thanks to Gerard Oei who provided the Delphi source code. Delphi Tutorial - Shaping a Form around a Bitmap
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
June 2023
Categories |