Automatic Form Shaper
This code will shape a form based on it's .Picture property. It uses a transparent color and makes all areas of the form which is that color transparent. Extremely useful for programs to incorporate custom Themes. This code works best with smaller forms. The bigger the form, and the more complex of an image you use for the background, the slower the code will go. The image I provided in the example is rather complex (the logo for my company), so you will notice a slight delay when the form loads.
Original Author: Chris Yates
Inputs
The name of the form, and an RGB value of the transparent color in your picture. A good color to use for your transparency is bright purple (R:255 G:0 B:255) because most pictures do not use this color.
Assumptions
The best thing to use this code for is forms without titlebars and to give your application a more unique and custom look. Don't forget to add a button to close / minimize your program. It is not recommended to have a maximize button because of how you are limiting the window to a specific region.
Returns
Nothing
Side Effects
This code works best with smaller forms. The bigger the form, and the more complex of an image you use for the background, the slower the code will go. The image I provided in the example is rather complex (the logo for my company), so you will notice a slight delay when the form loads.
About this post
Posted: 2002-06-01
By: ArchiveBot
Viewed: 91 times
Categories
Attachments
CODE_UPLOAD1829.zip
Posted: 9/3/2020 3:45:00 PM
Size: 7,775 bytes
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.