KiXforms.Net Learning Series - Windows Registry Run [Project 01 - Lesson 03]

Project 01 - Lesson 03 is a continuation of:
Project 01 - Lesson 01
Project 01 - Lesson 02
And is the last Lesson in the Project 01 Series.

  • All scripters are welcome, Beginners to Masters.
  • KiXforms.Net version or newer must be used. To verify your version of KiXforms.Net, use KiXforms.Net Version Checker (found below).
  • Please do not use this series just to bump your post count.
  • Do not post solutions until after solution post time is announced.
  • Collaboration is not allowed until after solution post time is announced.
  • I will post to indicate when solution post time starts.
  • Comments are a must, be descriptive but not excessive.
  • Use descriptive variable names to make it easier for yourself and others to follow what is happening.
  • The only help allowed is:
    • 'KiXforms.chm'
    • 'Kixforms.System.tlb'
    • 'Scripted Resource (Base64) Development Kit'
    • 'KiXforms Designer .NET 2.0 (Beta)'
    • 'The Script Center Script Repository'
    • ' UDF library collection'
  • Note: 'KiXforms.chm' can be found in KiXforms.Zip (KF.NET Development Build)
    'Kixforms.System.tlb' can be found in your System32 directory after the installation of KiXforms.msi (found in '').
    To view 'Kixforms.System.tlb' use iTripoli Type Library Viewer.
    If you choose, you can create a shortcut to the 'iTripoli Type Library Viewer' then, modify the shortcut target to:
    "C:\Program Files\iTripoli\Tools\TypeViewer.exe" Kixforms.System.tlb,
    then the shortcut will automatically open 'Kixforms.System.tlb'.
    Get Scripted Resource (Base64) Development Kit if you want or need it.
    Get KiXforms Designer .NET 2.0 (Beta) if you want or need it.
    Go to The Script Center Script Repository if you want or need to.
    Go to UDF library collection if you want or need to.
    You can also modify UDFs found in ' UDF library collection' if needed but make sure you comment on your changes.
  • All submitted code should be as though it were to be used in production.
    • Code should set options to On.
    • Error checking should be in place where needed.
    • All variables including form and controls should be Dimmed.
    • All UDFs should be self contained and all variables Dimmed.
  • All code should be in code tags.
  • When creating KiXforms the command console is not desired so use 'WKiX32.exe' not 'KiX32.exe'.

KiXforms.Net Version Checker:
;KiXforms.Net Version Checker

;Set Break to On if not in Logon Mode.
If Not @LogonMode
  Break On

;Set Code Options to On
Dim $SO
$SO=SetOption("NoMacrosInStrings", "ON")
$SO=SetOption("NoVarsInStrings", "ON")
$SO=SetOption("Explicit", "ON")

;Setup Variables.
Dim $System,$nul,$MainForm,$ProductVersionLabel,$ProductNameLabel

;Create 'Kixforms.System' Object.
$System = CreateObject("Kixforms.System")

;Verify the 'Kixforms.System' Object was created if not, notify and exit.
If Not $System
  $nul= MessageBox("KiXforms.Net Not Initiated."+@CRLF+
  "Please verify KiXforms.Net is installed."+@CRLF+
  "This Script Will Now Close.","Error",16)

;Create Form and Controls.
$MainForm = $System.Form()
$MainForm.StartPosition = $System.FormStartPosition_CenterScreen
$MainForm.Size = $System.Size(338,83)
$MainForm.Text = "KiXforms.Net Version Checker"

$ProductVersionLabel = $System.Label()
$ProductVersionLabel.Dock = $System.DockStyle_Top
$ProductVersionLabel.Text = "Ver. "+$System.ProductVersion
$ProductVersionLabel.TextAlign = $System.ContentAlignment_MiddleCenter
$nul = $MainForm.Controls.Add($ProductVersionLabel)

$ProductNameLabel = $System.Label()
$ProductNameLabel.Dock = $System.DockStyle_Top
$ProductNameLabel.Text = $System.ProductName
$ProductNameLabel.TextAlign = $System.ContentAlignment_MiddleCenter
$nul = $MainForm.Controls.Add($ProductNameLabel)

;Show the Form

;Loop to catch form events.
While $MainForm.Visible
  $nul = Execute($MainForm.DoEvents())
Exit 0

Objectives for Lesson 03:
  • Allow the user to:
    • Delete - move the checked entries from the top 'ListView.Items' to the bottom 'ListView.Items'.
    • Save - delete all entries (Listed in the bottom 'ListView.Items') from the selected 'Run' key, clear both 'ListView.Items' and re-enumerate the entries of the selected 'Run' key.
  • The 'Save Button' should only be enabled when the user clicks the 'Delete Button' and should be disabled when the user clicks the 'Save Button', 'Backup Button', 'Restore Button', and the 'Refresh Button'.
  • The 'Backup Button' and 'Restore Button' should be disabled when the user clicks the 'Delete Button' and enabled when the user clicks the 'Save Button' or the 'Refresh Button'.
  • If no 'ListView.Items' are added to the bottom 'ListView' then the 'Save Button' should not be enabled and the 'Backup Button' and 'Restore Button' should not be disabled.
  • The sorting order for both 'ListViews' should be set to ascending.

  • A function for the 'Delete Button.Click' event.
  • A function for the 'Save Button.Click' event.

You may ask questions, but do not post code.
I will post when solutions may be posted.
You may begin..
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)