VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Automatic Form Shaper

by Chris Yates (1 Submission)
Category: Windows API Call/Explanation
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (8 Votes)

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.

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.
Assumes
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.
Code 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.

Rate Automatic Form Shaper

Download Automatic Form Shaper

Download Automatic Form Shaper (7 KB)

Automatic Form Shaper Comments

No comments have been posted about Automatic Form Shaper. Why not be the first to post a comment about Automatic Form Shaper.

Post your comment

Subject:
Message:
0/1000 characters