Thursday, December 22, 2016

CtrlBox Class

This is another simple class that has been inside ssUltimate for quite a long time now.  But I designed this solely for the need of TitleBarX when I experimented on creating a control box that is purely made of shapes.  

However, recently I am changing my forms' appearances again and I now favor a form with no titlebar and border that is run maximized.  And while users of my app know they can always press Esc key to exit any of my forms, I still want an additional way for them to close it via a mouse.

I have other classes for those need, i.e., CloseX, CloseX2 and CloseX2s (smaller version).  But I suddenly thought last night it would be cooler to have a controlbox that has all that minimize, maximize/restore and close buttons.  Only that though. I still do not want a titlebar as I use vfp's own _Screen and having its titlebar and another titlebar below it does not appeal to me.

So I tweaked this one last night.  Now it can be dropped onto your form as well (if you intend to have a form that has no titlebar too) and it will adjust itself accordingly.  Though I have to kill its form pinning feature which is available for use in TitleBarX.

Here is how it looks like on one of my forms:

No comments:

Post a Comment