#170867 - 2006-12-01 01:07 AM
KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesson 01
|
Benny69
Moderator
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
KiXforms.Net Learning Series - Windows Registry Run [Project 01 - Lesson 01]
Next Lessons: Project 01 - Lesson 02 Project 01 - Lesson 03
Guidelines:
- All scripters are welcome, Beginners to Masters.
- KiXforms.Net version 3.1.45.0 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'
- 'KiXtart.org 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 'KiXfomrs.zip'). 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 KiXtart.org UDF library collection if you want or need to. You can also modify UDFs found in 'KiXtart.org 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
EndIf
;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)
Quit()
EndIf
;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
$MainForm.Show
;Loop to catch form events.
While $MainForm.Visible
$nul = Execute($MainForm.DoEvents())
Loop
Exit 0
Objectives for Lesson 01:
- Create a form script with KiXforms.Net.
- The majority of Events and Functions will be developed in Lesson 02.
Standard Code Set Options:
;region Set Code Options
;Set Break to On if not in Logon Mode.
If Not @LogonMode
Break On
EndIf
;Set Code Options to On
Dim $SO
$SO=SetOption("NoMacrosInStrings", "ON")
$SO=SetOption("NoVarsInStrings", "ON")
$SO=SetOption("Explicit", "ON")
;endregion Set Code Options
Create:
- A user intuitive, sizable form that centers it's self upon startup.
- The form and it's controls should resize and or adjust as the form is resized.
- A 'MainMenu' with the following functioning 'MenuItems';
- The 'File>Exit MenuItem' to exit the form.
- A 'ComboBox' at the top of the form, used to choose the registry run to look at or alter.
- A 'ListView' on the top half of the form, that resizes when the form is resized.
- A 'Splitter' so the height of 'ListView' can be altered.
- A 'Label' to describe what the bottom 'ListView' is for.
- A 'ListView' below the 'Label' to show the registry run entries to be deleted.
- A stack of six 'Buttons' (Control Stack) for the following (Events and Functions to be developed in Lesson 02):
- 'Save' - to save the changes made to the registry.
- 'Backup' - to make a backup copy of the current registry.
- 'Restore' - to restore the registry from the backup.
- 'Refresh' - to refresh the registry entries in the top 'ListView'.
- 'Delete' - to delete the registry entries in the lower 'ListView'.
- 'Exit' - to exit the form.
- An 'ImageList' for the 'Control Stack'. Each image in the 'ImageList' will be 16x16.
- The Images should be converted to a Base64 string for implementation in the form.
- GridLines should be enabled for both 'ListViews'.
- The form should start with the size 600,400 (Width, Height).
- The minimum size of the form should not be allowed to be smaller than 600,400 (Width, Height) if it is resized.
- An icon for the 'Form.Icon'.
- The 'Form.Icon' should be converted to a Base64 string for implementation in the form. The 'Form.Icon' will be 16x16.
The Form Appearance:
Attachments
Description:
|
Top
|
|
|
|
#170869 - 2006-12-01 01:17 AM
Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesson 01
[Re: Benny69]
|
Benny69
Moderator
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
You may use the image strip that I use for the 'ImageList' or create your own:
Attachments
Description:
|
Top
|
|
|
|
#170870 - 2006-12-01 01:19 AM
Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesson 01
[Re: Benny69]
|
Benny69
Moderator
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
You may use the image that I used for the icon for the 'Form.Icon' or create your own:
Attachments
Description:
|
Top
|
|
|
|
#170871 - 2006-12-01 01:19 AM
Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesson 01
[Re: Benny69]
|
Benny69
Moderator
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
The only Events and Functions you should work on/create is for:
- 'Exit MenuItem' to exit the form.
- The minimum size of the form.
I will post when solutions may be posted. You may begin..
|
Top
|
|
|
|
#170878 - 2006-12-01 05:33 AM
Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesson 01
[Re: Benny69]
|
Benny69
Moderator
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
My apologies you should also include functions for:
- The 'Form.Icon' - Base64 string.
- The 'ImageList' - Base64 string.
|
Top
|
|
|
|
#170890 - 2006-12-01 03:36 PM
Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesson 01
[Re: Benny69]
|
Benny69
Moderator
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
If you are participating please post that you are.
|
Top
|
|
|
|
#171176 - 2006-12-07 04:01 PM
Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesson 01
[Re: Gargoyle]
|
Benny69
Moderator
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
What does everyone think;
Should we wait until next week before we reveal code?
|
Top
|
|
|
|
#171240 - 2006-12-08 05:36 PM
Re: KiXforms.Net Learning Series - Windows Registry Run Project 01 - Lesson 01
[Re: Gargoyle]
|
Benny69
Moderator
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
As I see it, this is a learning session, I don't see any reason that we can not ask questions, more than likely it will help others. As long as we don't post code until reveal time, if you have a question I am sure I can point you to the answers you need.
|
Top
|
|
|
|
Moderator: NTDOC, ShaneEP, Mart, Radimus, Glenn Barnas, Jochen, Allen
|
0 registered
and 420 anonymous users online.
|
|
|