Saturday, March 28, 2015

TitleBarX - ssUltimate Library

May 15, 2015

Added _hidebar property to hide the titlebar section of the class.  Good when I wanted transparent section like this:


This Organizer I built to help me remember things while working as Admin reliever can change background on the ply.  And with TitleBarX there as well, then I can always change color of obects on the ply as well.

Friday, March 27, 2015

EditX Class - ssUltimate Library

This is the version of the sseditbox of ssClasses in this library.  This is a dropdown edit box which I designed to save space on form.  It appears as an ordinary textbox on form that is designed for long input such as those for memo fields.

While an editbox can contain more than the visible section via scrolling up and down, there might be situations where your form is so full of controls that there is not enough room to fit a decent editbox there; and this is where this becomes useful.

This class is built of two section, the one shown in the form that looks like a plain textbox, and a dropdown section that appears when you are typing and you reached the end of the textbox portion or when you click on the down arrow icon.

Once it looses focus, it auto-hides the dropdown section, just like a combobox.   Well yes, you can think of this just like a combobox but instead of lists of selection for the dropdown section, it has a plain editbox there.

What is New?

 - Cleaner codes versus ssEditBox, as I removed a lot of properties on PEM that is no longer needed in this version.

- Now it is a Control class

SwitchX & OptionSwitchX - ssUltimate Library

What is SwitchX?

SwitchX is a descendant of ssSwitch.  It is my attempt to replace the old looking native checkbox of VFP.  Especially in this era of mobile devices, then something like this can be seen on android, Windows or IOS phones, where you can switch it on and off.


What is new?

Better designs, more themes.  I kept changing my designs over and over again where I retain the ones I like and replaces others I don't.  So definitely, some of the themes here will still change in the future; but you can safely guess which I will change later (the ugly ones, what I have shown below will be retained as those are among my fave).

Three new parameters, cToolTipText, nFontSize, cFontName.  I believe the names I used are self-explanatory enough.


What is OptionSwitchX

Well, this is the counterpart of the native OptionGroup of VFP.  I re-used here SwitchX so both will be receiving the same themes.

What is New?

Two new parameters,  cFontName, nFontSize 


OptionSwitchX Limition:

OptionSwitchX can only have a max 12 switches.  The reason for that is in my end, I rarely or never yet needs an OptionSwitchX or even the native OptionGroup with 12 buttons/switch.  So I believe it is more than enough.  Anyway, the codes are included when I release this library to the Subscribers so they can add more if they want.


Themes, where are those coming from?

All of those themes I design using Photoshop.  So you can do the same.  The themes images are stored on a separate class named ImagesSwitch so you can add more themes if you want.  Since I embed the images for extraction converting those into Base64 Binary, then you can use the Binary Block Breaker tool I shared last time for that need:  http://sandstorm36.blogspot.com/2012/06/binary-block-breaker-tool.html

Here are some of the themes, there are 20 themes right now:


Of course, the actual images are clearer and cleaner than the above because clarity is lost on conversion to a jpg format, and lost further during upload as those I believed were reduced further for faster viewing via web.  Plus the image is resized smaller.

Thursday, March 26, 2015

ConX & ContainerX Classes - ssUltimate Library

ContainerX Class - Brief Introduction  

When I first started working on ssUltimate Library, I decided to create a counterpart of ssContainer there I called ContainerX.  This basically is just like ssContainer but with cleaner codes and better looking themes as the themes I used in ButtonX is also being utilized here.

In _ssClasses library, the image of ssContainer is dependent on your usage of ssButton for it is ssButton that takes care of generating the images.  So when you don't use ssButton, then ssContainer will also be useless as the images it needs won't be there, and you will get a big X which is the default appearance of an image object without any picture attached.

In ssUltimate, I created a separate custom class for the images extraction, and both classes has that custom class inside.  So those two, while still working with the same images, no longer relies with each other.



ConX Class, the difference

ButtonX Class - ssUltimate Library

As much as I do not want to post here classes of ssUltimate that I retained strictly for my subscribers, since I no longer explain what changes I do now and then inside the library, then they have no way of knowing those; and therefore they are under utilizing it or does not know how to fully utilize it to their maximum advantage.

And so I decided that from now on, I will slowly post here those classes that remains hidden for others to serve as a guide for my Subscribers.  And to make it clear, those that are strictly for them will always have a suffix of - ssUltimate Library.

What is ButtonX?

ButtonX is my final button class which is the predecessor of ssButton series.  Any new features on a button class is done on this one.  This class is highly customizable based on the taste of the developer where you can change the position of the caption, change the theme, its color, etc.

What is new here?

Thursday, March 5, 2015

Windows OSK inside our Form

Have shared earlier an embedding technique of a 3rd-party app called Virtual Keyboard with codes of  Vilhelm-lon Praisach (with his permission) because while I don't need it, others who used to frequent my blog may.

But since I wanted to find out also how to embed the nasty elusive built-in On-Screen Keyboard (OSK) of Windows which yesterday gave me a lot of frustration as surprisingly it is harder to control than said Free Virtual Keyboard, gleaming new codes from Vilhelm I decided to renew my failed attempts on how it can be done.  Sometimes though when I do try to control things I do not need yet like this one, in the midst of it I wish I should have simply banged my head on the table; for again it seems I am unnecessarily stressing myself  on something I myself do not need nor use (yet).

Anyhow, while finding ways like this sometimes makes my blood pressure go up due to frustrations, in the end when I find a way, I felt a bit of contentment as that is another understanding (to an extent) of these somewhat elusive WinAPIs.   I have yet fully understood these things and just relies on my observations and trials and errors; but I think I am slowly getting there.

On-Screen Keyboard for POS

On a POS system, since we are dealing with touch screens, then we need to have a keyboard on screen so our users, in addition to barcode scanning, can do other more works.  And for that what we normally do is create our own on-screen keyboards.  Or utilize the built-in OSK that comes along with Windows that can be simply called via RUN /N OSK.EXE.

What is more appealing though is to make said OSK appear to be really a part of our form and this can be done via embedding said OSK.EXE within our form.  However, embedding Microsoft's OSK is easier said than done.

Good news then, here is an alternative to Microsoft's OSK (On-Screen Keyboard) that can be easily embedded inside our forms.  Further good news is that this one is free: http://freevirtualkeyboard.com/

For the embedding need inside our form, I will refer you to the codes  graciously shared to us by a good friend Vilhelm-Ion Praisach.  In addition to the tricks he used there, I like his subtle touch here on the usage of a timer instead of my SLEEP() way on the embedding 3rd party apps within our forms blog.


Monday, March 2, 2015

Fake Checkbox on Grid

As most of my posts, this one also comes from a need of a member inside Foxite forum.  His desire is to have a uniquely looking checkbox and so my advice is to utilize two images representing checkboxes, one that is ticked and the other not ticked.  Then to manipulate viewing of the image via  DynamicCurrentControl.



In my mind, even without testing yet, I believe it will work good.  But I was notified later that that trick requires two clicks and so I tested and it did needs two clicks as follows:

1st click - to set focus and activate the cell
2nd click onwards - actual toggling of the underlying logical field

And I agree that if we can get around the issue of the first click, then that would be better.  However, I cannot find a property or event  to activate a cell using click and then perform click on the image as well in one go.  But believing  there is always a way, I tried other ideas.  And as I found a way, then here it is again, maybe you'll need something like this: