Friday, December 18, 2015

Controlling Windows 10 Auto-Updates

I bought a laptop a few months ago with a licensed Windows 8.1 OS.  But since a colleague of mine was able to download an offline Windows 10 free upgrade and burned it into a CD, then immediately after purchase I upgraded mine to that latest OS version (to hell with Windows 8).

And I love it (though on some machines, I encounter blank screens after upgrade that I was forced to reinstall an older version) but there are certain things we need to turn off on privacy settings for our own peace of mind.

Since my Windows 8 is a 64-bit home version, I got the 64-bit Home version of Windows 10 as well.  And unfortunately, while I like Windows 10 better, I am annoyed by its auto-Windows Update where MS totally removes our freedom to choose which upgrades we would like to be installed in our machine.

And due to that forced updates, I  have seen reports on the net of people wailing that after some certain updates, it short-circuit their machine making them curse in grief Windows 10.  Due to that is why I decided to create this post

Option 1 - Turn-off Windows Update

Right-click on taskbar, Task Manager, click on Services Tab, click on Open Services link below.

Inside Services, look for Windows Update, double-click it, choose "Disabled" as start-up type.

In some cases, you will wonder why sometimes after you've done this and after a while you re-checked its status, you will realize it is still running even though the start-up type is still on Disabled.  That is because MS provides a "recovery" action to be done in case it detects failure of a service.

So to totally kill this update, you have to turn off recovery action as well.  See image below



However, it appears that in some cases, even when these are implemented, Windows 10 can still do an uncontrolled update.

Is turning it totally off a good suggestion?  I will leave that to each of you whether you are already comfortable with your OS 10 version or if you want it to still install some patches.  In which case you can re-enable it back at your own accord.

This next alternative might be better for you

Option 2 - Intercept Updates

Okay, this option deals with still leaving windows 10 to do an auto-update but now we will be intercepting its updates.  And to do that you have to install 3rd party downloaders such as Internet Download Manager (IDM), Xtreme Download Manager (XDM), and Download Accelerator Plus (DAP), to name a few.

I am using on my end now XDM 2015.  So when Windows 10 attempts to download a file, this is now being intercepted by XDM.  It will then ask you whether you want to continue downloading it or you can press Cancel.  The moment you pressed/clicked Cancel button, then XDM will release its hold on said intercept and the OS will be given back control over it.

In this way, it is like having control as well which of the attempted downloads will be given back to Windows.  What I do on my end is for those I do not like to be downloaded, I leave XDM intercept window and just move it out of the way and for those I like my OS to download, I clicked Cancel to allow my OS to download it.




There you go, ways to control windows update features of Windows 10.  Cheers!

Monday, December 14, 2015

What’s on ssUltimate Library

Want to be a subscriber?  Click  Subscribe to ssUltimate

Here are what’s inside ssUltimate Library in alphabetical order (from time to time I update the write ups on each link to inform of the enhancements I made).  The library comes with a sample project with demo forms with the following:

  • CloseX - Is another form of titlebar class that gives a unique appearance.  It can have a titlebar or just that plain close button located at the right side of the form
  • DropClock – a dropdown clock.
  • FaderX – a class that when dropped simply on form will turn irregularly shaped objects into transparent.  Can change transparency level on runtime
  • ImgBack – is an image class that when dropped on form, will give it a background wallpaper.   This wallpaper can be changed any time via double-clicking and it will be retained until you change it again.  
  • MonthYear – a class that looks like a command button which shows the month and year.  This was created before I gave dtPickerX the same capability
    • MSOButton – a class that looks like a command button on Office 2010. 
    • PolyClock – an analog clock that can be dropped on form, can be moved, change skins, etc.
    • ScrollTime – is a time control class that scrolls up or down via mouse scroll.  Similar to what mobile devices has
    • StickyX - Another class that can be used to replace editbox with a sticky note look.
    • TimerX - is a time picker based on spinners.  
    • TransparentX – This one simply make the irregularly shaped image used on form instant transparent

    Want to be a subscriber?  Click  Subscribe to ssUltimate

    Friday, October 30, 2015

    xBox October 2015 release

    Its been a long time that I have not done any intensive developing but last week I decided to try to resume my mood on it.  Finally, yesterday my mood somewhat returned and so after a long time, I decided to adjust xBox class which really needs an overhaul.

    Here now are the new features for this release:

    Introduced _HighlightKey  Property

    .T. (Default) = will highlight the keys you've pressed so far.  Good for dropdown feature (see images)




    I decided to have this as an extra guide for users to know what keys they have pressed so far.




    .F. = will highlight suggestions for quickfill.  Good for without dropdown


    Introduced _PlainBox Property

    If you will be using xBox just because of its look (curvature and markers) without any quickfill suggestion or dropdown feature, then set this as .T..  Default is .F.

    Miscellanous Enhancements

    Well, I've made some clean-ups on codes such as relocating all the WinAPI declarations so it will be declared only once instead of repeatedly re-declaring those on the popup/dropdown grid.  Centralized as well the highlighting capability of the class.

    Monday, August 10, 2015

    Going Barefoot, Health Benefits




    Lately I observed that whenever I take a shower, while wet and I reached for the shower knob, I always receives a minor electric jolt, not too much but still disturbing.  When I reported that to my wife, she said she never experienced such, so it appears that is related in my body system and not with the circuitry of the house.

    So I started wearing rubber slippers while taking a shower and it worked good for quite a while. Until this morning, I got a much stronger shock when I reached again for the knob to turn the water off, now even while wearing a rubber slipper during the shower.

    So immediately upon arriving here in the office, I googled outright what could be causing this severe static electricity problem I have and the possible remedies, if any; as I am sure something is wrong with my current body metabolism.

    And that is why I am making this blog to share what I have found out

    Electricity Build-Up

    As we know, our body is capable of generating electricity and storing those up.  There are numerous reasons for that but the amount of static electricity each of us can store varies on our own metabolism.  Some are very susceptible to it, others not much.  It appears that the more acidic our body is, the greater it can absorb and store electricity.  Or if our blood is thicker, then the same goes.

    Wednesday, July 15, 2015

    xBox, How To..

    xBox' Usage, Explained Further

    xBox is among my most complicated classes to date due to the fact that I have given this three (3) possible usage.  And a new user is getting confused with it that I decided to rush here explanations on its features as I believe not everyone can easily see, despite my examples shown in codes on the sample form, how the class' different features can be utilized to each developer's advantage.

    Take a look at this image below where the class is using the Combo Feature (QuickFill + Popup Grid)


    But then, the class is designed to be used as just plain quickfill, plain popup/dropdown grid or that combo.  Explanations follow:

    Tuesday, July 7, 2015

    ExcelPivot (ssUltimate)

    I was not with the habit of creating changelogs on my classes but I started lately doing that.  So my subscribers will know what those are without me trying to explain each.

    Well the major enhancements with this over the previous revisions are:

    • Faster - by cleaning up further the codes and looking for ways to speed this up further, this now generates Excel Pivot reports by 20% faster as before
    • Added _RepeatLabels property
    • Ensured that Excel output will show as Maximized
    • Added Arrows to quickly clear previous selections (Filters, Rows, Values and Columns)
    • Added option to show or hide Grid Lines on Excel sheet
    • There are more which I failed to log before
    • Bonus to Subscribers, a sample showing how to use additional automation for this class


    Monday, June 29, 2015

    Combobox with Filtering Capability

    Here is a combobox that can filter the items in the dropdown list based on what has been typed so far.  It is a good candidate for replacing my xBox class if you don't need a Quickfill/Auto-Complete or if you wanted only a dropdown that is being filtered.  This uses SQL SELECT as RowSourceType.




    Before running the sample, there are two things you should know outright:
    • Double-clicking on the textbox portion will clear DisplayValue and will restore the original SQL SELECT
    • I used Ctrl+Enter to trigger the dropdown section
    Here are the codes:

    Thursday, April 2, 2015

    xBox - ssUltimate Subscribers

    What is New?

    Added ProgrammaticChange event.  Now we can perform, say a new SQL SELECT based on the class' Value or ExtraValue, as we select on the dropdown grid via either arrow keys or mouse click.   Or update related objects on the form based on this class, as we select.  This event is what gets fired when selecting via dropdown grid.

    Fixed bug on Enter key suddenly changing value onto a different one via updating _SearchKeys with what is selected on dropdown and moving SelStart position at the end as well.


    Fixed bug on the class retaining old _SearchKeys value even when we totally remove the previous entry via backspace or delete keys


    For a more thorough learning of this class, see other features and updates of the class up to the point of the shared version:  http://sandstorm36.blogspot.com.au/2015/02/xbox-with-popup-grid.html


    Unmentioned Trick

    One of the things I forgot to mention is that you can return combined field values as its single Value. I do that on my end like this:




    Now, when you want to use one of those multiple values it returned, then you can utilize GETWORDNUM().

    That capability is on both the shared and per Subscriber versions.

    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:

    Wednesday, February 25, 2015

    For Each...EndFor GOTCHA!!!!

    Working on a new concept for my Fake Tabs need, I decided to create a container class that will act as a page tab.  Then to emulate a pageframe, I control the position of the tab on each instances of the class.  Then pile those up on top of each other.  So if I need say 5 tabs, then that will be 5 of that container class that is piled on top of each other.  Switching tabs is done via switching Zorder().

    With this fake tab, I can change colors per tab or use the same color but with different shades.  With the tab width auto-adjusting based on the caption I put into it plus its Font Name and Size, I am happy with the result.

    While those can be achieved as well on the native VFP tab via turning Themes=.F. and TabStyle = 1 (Non-justified) properties of a pageframe object, I like to have a uniquely looking tab for my use and not that Windows 98 looking tabs when I need a colored tab; so the extra work on my end to achieve it.

    Everything works to my satisfaction until I decided to add a sort of highlighter in the form of a dotted transparent shape to act as an indicator of the active tab.


    Tuesday, February 17, 2015

    Firefox Inside VFP Form

    Nothing new here, I used the same approach in the Chrome one but worked on FireFox itself this time.  This is to see if my suspicion that the reason for WinAPIs' inability to control the titlebar of Chrome is because it really has its own titlebar.

    Also, this is based on advise of Bernard Bout to try this on FireFox.  This works on my end since I am using an older version of FF which is 12.  The titlebar is hidden properly.  I have not tried it though on newer version of FF as I don't download any being I prefer Chrome.  So it is up to you guys to test this on those newer version.


    Anyway, here are the codes, with the same approach I used on Chrome and some changes on Windows Styles:

    Monday, February 16, 2015

    Chrome inside VFP Form

    Update February 18, 2015:

    This is getting interesting.  I suddenly thought maybe Chrome allows parameters to be passed and indeed there are, tons of it.   Here are the switches:

    http://peter.sh/experiments/chromium-command-line-switches/

    As for forcing Chrome to open on a new window instead of the existing one as a tab, it is --new-window

    I also updated the sample below to know whether the operation is successful or not so it won't accidentally open any other active window aside from our target.

    Later:

    As  for my problem to get rid of Chrome's internal titlebar, the trick came out to be very easy.   All we need to do is move the chrome up from within our form that its own internal titlebar cannot be seen anymore, and thus rendering it likewise immovable.

    Check the codes below, adjust lnMove value based on how you set up your Chrome on your end.  Since in mine I show my bookmarks, then my adjustment is 100.  Maybe on the link I gave above on the command switches, there are commands to hide those, but I did not check anymore. :)

    ======

    Sparked by last week's thread inside Foxite Forum about placing an IE Browser inside VFP Form, I thought to myself it would be cool to put Google Chrome inside our form for a change.

    Also, this will ensure that most probably a webpage can be displayed properly being Chrome is always up to date with changes introduced now and then, as compared to IE that has been left far behind and is giving developers now some headache to fix it via Registry tweaks.


    Googling does not give me any result on how this new sudden thought of mine can be done as I never found any that shows how to achieve this without downloading and working on extension designed to provide automation to google.  But I simply wanted chrome to be inside our VFP form using stock VFP commands and function plus utilizing WinAPIs.

    Thursday, February 5, 2015

    xBox with Dropdown Grid

    Updates 2/10/2015

    Added optional sort of tooltip guide containing the internal caption via _withGuide property (default is .T. or shown).  I realized that with the class relying on internal caption, it is sometimes hard to know where you are once the focus is on it (I feel sorry for my users) until they become so familiarize with the module.

    I was adjusting our Request module when that realization hit me.  So if you want it shown, set it to .T..  However, please be aware that once you allow the guide to be shown, then the dropdown grid will adjust downwards to give room for it, otherwise it won't be seen.



    Updates 2/9/2015

    Thursday, January 29, 2015

    TitleBarX Class

    * Updates February 2, 2015

    Added NoMax property to hide Max Button.  This should not be confused with _noMax property which simply disables the max button

    Added NoMin property to hide Minimum Button

    Added 3 shapes at the bottom to give an illusion of a gradient bottom border.  Although GDI+X is good for gradient, I want my classes to not be dependent of an external file like an .app.  Maybe in the future I may change decision or not

    Added Form Pinning capability on Controlbox section.  When it is pinned, the pin icon will turn into red and you won't be able to move the form.  To unpin, click on it again

    Removed the date and showed instead plain time().  Made it bigger

    Added _shade method.  That is what you can use to get a different shade of the current color you  pick for other objects in the form (using _SwapColor Method).  So now you can implement color themes with variying shades not only on the class itself but on any objects you wish.  Here is how it looks like


    Friday, January 16, 2015

    Tick/Untick a checkbox on Grid with AllowCellSelection = .F.

    Normally, when we want to put a checkbox on grid for the purpose of ticking and unticking it, then most probably most of you do it this way:



    • Set AllowCellSelection = .T.
    • Drill to every textbox object inside each columns and put under When method Return(.f.).  That is to prohibit the cell in getting focus


    An alternative way is to set AllowCellSelection = .F. and use grid's double-click on toggling the value of the logical field bound to that checkbox, then perform a grid refresh

    Monday, January 12, 2015

    ShellExecute, Force open file to non-default application

    As most of us know, ShellExecute() is a very useful tool to open a file on its external associated application.  When you issue this command:

    Local lcFile
    lcFile = Getfile('doc,docx')
    If !Empty(m.lcFile)
          ShellExecute(0,'open',m.lcFile,'','',1)
    Endif

    Then that document file will be opened by MsWord or its counterpart like say on LibreOffice

    Or if you do:

    Local lcFile
    lcFile = Getfile('xls,xlsx')
    If !Empty(m.lcFile)
          ShellExecute(0,'open',m.lcFile,'','',1)
    Endif

    Or even: