VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Automatic Form Shaper

Chris Yates  (1 Submission)   Windows API Call/Explanation   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

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.

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 (9(9 Vote))

Download Automatic Form Shaper

Automatic Form Shaper Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters