i don't know if the word "ala" is universally accepted but it means "like a", and so "like a silverlight".  this is actually in no way related to the famed microsoft's silverlight technology.  but when i decided to change my style for the nth time, i thought of the silverlight technology feature which i found to be cool, i.e., with thumbnail generation.  so i said to myself that day, i will make my main form like a silverlight (ala silverlight) and will show the user what will be the appearance of the sub-module even before calling it.  and since during that time, i already tuned my attention to working with a treeview, i combined both.

i think i have shown in most of my blogs how to do things in simple ways.  i am a simple man and so my snippets are likewise simple.  things can be achieved without making hard codes (not hardcode, lol!).  all we need is a bag of tricks.  and so since some are requesting and emailing me to provide a sample of this one, i deemed it better to post it here because it would be unfair to others if i will just give this to those who are requesting. 

so now, i am revealing the secrets behind my ala silverlight form:

as i have previously said, the thumbnails must be created by the developers themselves.  it will come last actually, or during the development stage.  but it cannot be done beforehand, meaning you cannot create a thumbnail of something that don't exist yet.  maybe you can but that would not have the same appearance as the called module, and therefore would defeat the purpose of the thumbnail.  here are the procedures:

1.  once a module is already created, call it within the main form so it will be activated
2.  capture the entire screen via pressing printscreen key on your keyboard
3.  open mspaint (formerly known as microsoft paintbrush) and press ctrl+v
4.  click on any other icon in the toolbox located at the left side of mspaint (except text icon) so entire selection of the pasted image will be removed.
5.  press ctrl+w (stretch/skew) and compress via ratio of 20 to 40% depending on your taste for a thumbnail.  apply same ratio for both horizontal and vertical
6.  save as the same name you gave inside the xmodule field (per my sample here).  i am recommending saving as jpeg to reduce size
7.  place in your thumbnail sub-folder.  in my sample here, i created a sub-folder named thumbnail.

that is it, the sample i gave here will auto-link those images.

on my side, i have some more fields for the treeview which handles the parameters passed to the calling form, plus logical fields which will determine if that node will appear or not depending on the level my app's administrators will give to a certain user. also i use  it just for calling sub-forms but in the sample i provide here, it now shows how other thing can be done aside from just calling sub-forms as i want to show how we can make it a little more flexible.  the idea is there, modify it more to your needs.

in my past experiences, whenever i show how things can be done, someone will always comment something like "what's so damn unusual about this?!!!!".  and that is because like what i have said before inside foxite forum; when the way how things can be done is revealed, it always looks so damn simple!  sure!  but the point is, how the idea is concocted in the first place then how it is implemented afterwards! smile [:)] 

for now, enjoy this one!

5 Responses to ala Silverlight revealed….

  • Benny Thomas says:

    Hi Jun,

    Excellent.  This will give application a great look.  Sadly, the Exit button is missing from your downloaded file.  Where did it go?

    Benny

    # Oh!  I thought that that blue exit is not that noticeable.  I planned to include it in the sample but since I want to show how to manipulate the treeview by doing other things, aside from being a mere displayer of nodes, I included an exit among the nodes and removed that blue exit. 

    If you are really interested in that, then maybe I can include it among my future blog samples or you can give me your email so I can send it to you, among with other images that I will deem might help you beautify your apps.

    Glad you liked it by the way! Smile <img src=” />

  • Julito Arcaya says:

    hi jun,

    can you teach me how to do it…i have to beautify my apps..
    thanks in advance..jaarcs at gmail.com

    #I am confused.  The style of using treeview to call sub-forms and other things are already in the attachment here, that is why I titled it revealed.  Download attachment, extract it, then load the project in VFP and run.  The commands and objects are inside.

  • chaim says:

    Your treeview support only english:(

    #Well that is news to me.  I never tried any other language on TV but I believe any language can be used on the field Text?  I will test later when I get back to PNG

  • chain says:

    Please check with hebrew.

    I see Jibberish on your treeview when I populate the cursor with hebrew.

    Usually I dont have problems with vfp\treeview in vfp.

    Thanking you in advance

  • Alan Tuscano says:

    Wow, i’ll expore the attachement more..

    nice…. Ü

Leave a Reply

Your email address will not be published. Required fields are marked *