As I am in the mood these days to create transparent irregularly shaped forms, I decided to work on another module on my end to give it a better appearance. So last night I sat infront of my laptop ignoring my lovely wife designing yet another transparent form for that module playing with Daryl Bautista's Photoshop's styles script (many thanks!) and tweaking those a bit.
Then another thought hit me because I fail again to duck. How about combining both ssTransparent and ssClose classes so I can have a cool close button in no time at all? After much moving and styling of layers for the image to be used as the background and playing with ssClose settings, here is the result:
I have been playing with ssClose's borderline like its thickness and color. All look awesome to me but I finally decided to make the borderline transparent as well and here is a closer look for that effect:
Steps to implement the same on your end:
- Design a form background (non-resizable) in Photoshop that will be used as irregular transparent shape later. Save it as bmp.
- Use that as form's background (Picture)
- Make the form's ShowWindow = 2 or Desktop = .T.
- Drag and Drop ssTransparent class on your form
- Drag and Drop ssClose class and set it up.
The effect of transparency over ssClose class is because of these 2 parameters:
- 2nd Parameter - nBorderColor. Leaving it empty will make it invisible
- 4th Parameter - lTransparent. Setting it to .T. will make ssClose's background transparent
Aside from having a cool looking close button? You can move the form to a portion of your screen and pin it there on the ply making it immovable.
And there you are, as simple as that! If you want to have the same, implement it now on your end. Now it is time to me to sleep otherwise I will be ducking more than a thought from my wife, LOL! Nah! My lovely wife is very supportive of what I do.
The day after:
What seems to be good looking last night seems ugly now, so here is the new look of that module:
And that is what is also good with ssClasses library. Just a little tweaking on the settings and I have different cool looking buttons now. ;-)