ShawnAdministrator
(KiX Supporter)
2003-07-04 10:47 PM
Kixforms 2.3.0 Beta 3 Build 41 Special Build 2

The latest Kixforms Beta 3 Special Build 2 is now available ... it addresses the following issues ...

1) Incorrect default StartPosition of Form.

2) Incorrect painting of TabControl background

Hopefully these are the only issues with the Beta, I encourage you to report anything else suspicious .. thanks

-Shawn


kholm
(Korg Regular)
2003-07-04 11:08 PM
Re: Kixforms 2.3.0 Beta 3 Build 41 Special Build 2

Thank you Shawn,

I use KiXforms with great plesure.

I'm 'silently' implementing it in my AD-domain.

So thanks to KiXforms AND WKiX32 it is possible to totally avoid the 'DOS' console

Even if you 'hide' your script via AD-policies it is only the 'console' that is hidden.
The dispaly of Forms from KiXforms is stil displayed

-Erik


ShawnAdministrator
(KiX Supporter)
2003-07-04 11:12 PM
Re: Kixforms 2.3.0 Beta 3 Build 41 Special Build 2

Erik, have you checked-out the CHM yet ? It was your prodding that kept me going on that. Although not 100% done yet. It has all the "new stuff" and will be completed before the final. And going forward, religiously maintained. The CHM can be considered a beta as well. Its the first public release, so there are probably bugs and inconsistencies in there ... would love to get feedback on the CHM (in any regards) as much as the DLL itself.

Thanks again for encouraging me on that CHM ...

-Shawn

[ 04. July 2003, 23:13: Message edited by: Shawn ]


masken
(MM club member)
2003-07-05 01:44 AM
Re: Kixforms 2.3.0 Beta 3 Build 41 Special Build 2

shawn, I think the CHM is wonderful [Smile] Well thought through. Perhaps some more examples would be nice though [Smile] One thing that I really miss though is the Content/Index/Search tabs [Smile]

LonkeroAdministrator
(KiX Master Guru)
2003-07-05 01:49 AM
Re: Kixforms 2.3.0 Beta 3 Build 41 Special Build 2

actually, you are right.
those are the only reasons why to set up a chm.

a really simple doc or even web-page can better offer the basic form of chm.
but the strength of chm is in the search and index and local cache and...


ShawnAdministrator
(KiX Supporter)
2003-07-05 03:23 AM
Re: Kixforms 2.3.0 Beta 3 Build 41 Special Build 2

yeah, definitely need more examples, would like to have a large example for each object. if anyone wants to contribute an object example please feel free to send it my way ... for example, here is a ProgressBar example (that hasn't made it into the CHM yet) ... basically what they do is demonstrate all the features of each object ...


Break On

$Form = CreateObject("Kixtart.Form")

$Form.Text = "ProgressBar"
$Form.FormBorderStyle = 3 ; FixedDialog
$Form.ClientSize = 506, 175
$Form.MaximizeBox = False
$Form.MinimizeBox = False
$Form.Center

$grpBehavior = $Form.Controls.GroupBox
$grpBehavior.Location = 248, 16
$grpBehavior.TabStop = "False"
$grpBehavior.Text = "ProgressBar"
$grpBehavior.Size = 248, 152
$grpBehavior.BorderStyle = 2

$lblStep = $grpBehavior.Controls.Label
$lblStep.Location = 16, 24
$lblStep.Text = "Step:"
$lblStep.Size = 48, 16

$lblSpeed = $grpBehavior.Controls.Label
$lblSpeed.Location = 16, 80
$lblSpeed.Text = "Completion Speed:"
$lblSpeed.Size = 200, 16

$cmbStep = $grpBehavior.Controls.ComboBox
$cmbStep.Location = 136, 24
$cmbStep.Size = 96, 21
$cmbStep.DropDownStyle = 1
$cmbStep.OnClick = "cmbStep_Click()"
$cmbStep.List = "1", "5", "10", "20"

$lblCompleted = $Form.Controls.Label
$lblCompleted.Location = 128, 56
$lblCompleted.Size = 56, 16
$lblCompleted.TabIndex = 2

$lblPercent = $Form.Controls.Label
$lblPercent.Location = 24, 56
$lblPercent.Text = "Percent Completed:"
$lblPercent.Size = 112, 24
$lblPercent.TabIndex = 1

$lblValue = $Form.Controls.Label
$lblValue.Location = 128, 80
$lblValue.Size = 56, 16
$lblValue.TabIndex = 4

$progbar = $Form.Controls.ProgressBar
$progbar.BackColor = "Control"
$progbar.Location = 24, 24
$progbar.TabIndex = 0
$progbar.Size = 192, 16
$progbar.Step = 1
$progbar.Text = "progbar"

$sldrSpeed = $grpBehavior.Controls.Trackbar
$sldrSpeed.BackColor = "Control"
$sldrSpeed.Location = 16, 96
$sldrSpeed.TabIndex = 1
$sldrSpeed.TabStop = False
$sldrSpeed.Value = 10
$sldrSpeed.Maximum = 100
$sldrSpeed.Minimum = 10
$sldrSpeed.TickFrequency = 10
$sldrSpeed.Size = 216, 42
$sldrSpeed.Text = "trackBar1"
$sldrSpeed.OnScroll = "sldrSpeed_Scroll()"

$lblValue = $Form.Controls.Label
$lblValue.Location = 24, 80
$lblValue.Text = "Value:"
$lblValue.Size = 100, 16
$lblValue.TabIndex = 3

$iSleepTime = 100
$timer1 = $Form.Controls.Timer()
$timer1.Interval = $iSleepTime
$timer1.OnTimer = "UpdateProgress()"

;
; Initialize ...
;

;$cmbStep.SelectedIndex = 0
$cmbStep.ListIndex = 0
$progbar.Step = 1

$Form.Show
While $Form.Visible
$=Execute($Form.DoEvents)
Loop

Exit 1

Function sldrSpeed_Scroll()
Dim $time
$time = 110 - $sldrSpeed.Value
$timer1.interval = $time
EndFunction

Function cmbStep_Click()

$progbar.Step = $cmbStep.Text

EndFunction

Function UpdateProgress()

Dim $min
Dim $numerator, $denominator, $completed

If $progbar.Value = $progbar.Maximum

; Reset to start if required

$progbar.Value = $progbar.Minimum

Else

$progbar.PerformStep()

EndIf

$lblValue.Text = $progbar.Value

$min = $progbar.Minimum
$numerator = $progbar.Value - $min
$denominator = $progbar.Maximum - $min

$completed = CDBL($numerator) / $denominator * 100
$lblCompleted.Text = "" + $completed + "%" ; Math.Round(completed).ToString() + "%"

EndFunction


LonkeroAdministrator
(KiX Master Guru)
2003-07-05 05:51 AM
Re: Kixforms 2.3.0 Beta 3 Build 41 Special Build 2

if that is an progressbar example (like you said it is) it's 19001% overkill.
simple example of the features functionality is enough.

here you have a whole script (totally unrelated) and a function library included.

basically progressbar can exampled with some lines.
you don't have to create database accessing script that does some fancy html stuff on the bacground and shaves your bosses hair just to show what the object/event/property does.


masken
(MM club member)
2003-07-06 12:19 AM
Re: Kixforms 2.3.0 Beta 3 Build 41 Special Build 2

hehe.. yeah, perhaps it's a good idea to stay away from the bosses hair [Big Grin]

Anyhow, like we discusses at the KiXforms forum too, just small explainatory ones, dealing with the explicit function [Smile] Your point is good though shawn, it's also nice to see "real examples" of it's usage too.

Perhaps each (or as many as possible) object could have an "Examples" page in the CHM, where the first example is a very basic one. Then if there's more examples available, they could advance for each example or something [Smile]


ShawnAdministrator
(KiX Supporter)
2003-07-05 07:54 PM
Re: Kixforms 2.3.0 Beta 3 Build 41 Special Build 2

ja, small snippets of examples are ok, but its a real pain-in-the-butt when one actually has to write an entire script just to see the snippet in action (especially with graphics asre involved). Its just like the .NET examples on MSDN, some are snippets and some are entire programs - the ready-to-run ones are the best. In fact, that ProgressBar example is a straight port of the .NET ProgressBar example [Wink]

-Shawn


kholm
(Korg Regular)
2003-07-05 08:09 PM
Re: Kixforms 2.3.0 Beta 3 Build 41 Special Build 2

Thanks again Shawn,

The .chm file looks very nice.

I just observed the KeyCode property while making a quick browse of the .chm

A suggestion:
Could you make it possible to check if more than one of the flag-keys: Alt,Shift,Control
are down at the same time

By giving them the values 1,2, and 4

And then make this return true only if all 3 keys are down:
$state = $Object.KeyState(7)

Or return true if Alt and shift are down:
$state = $Object.KeyState(3)

-Erik


ShawnAdministrator
(KiX Supporter)
2003-07-05 08:52 PM
Re: Kixforms 2.3.0 Beta 3 Build 41 Special Build 2

ja, good idea. Since I want (to try) to be a bit more carefull going forward in terms of dotnet compatibilty, lets compare your suggestion (which I like) with the quasi-dotnet version ... which you may or may not like:

Every object that can generate a keyboard event (like OnKeyDown, OnKeyPress, OnKeyUp) has a property called "KeyEventArgs" that returns a KeyEventArgs object. This object has the following properties:

KeyEventArgs.Alt
KeyEventArgs.Shift
KeyEventArgs.Control
KeyEventArgs.KeyCode
KeyEventArgs.KeyData
KeyEventArgs.KeyValue

For example, the "Alt" property returns a value indicating whether the ALT key was pressed. The "Control" property returns a value indicating whether the CTRL key was pressed. The KeyCode, KeyData and KeyValue properties return info about what key was pressed.

Looking at some MSDN examples, kixscript would look like:

$e = $Form.KeyEventArgs

If $e.KeyCode = ASC("A") And ($e.Alt Or $e.Control OR $e.Shift)
; ..
EndIf

Dotnet developers (and dotnet function prototypes) always seem to want to "cast" xxxEventArgs to a variable called "e". But long story short, this is the dotnet way of things, but the way you suggest is more straight-forward I think, but the again, when I deviate from things it always tends to bite me latter [Wink] Thoughts Erik ?

-Shawn


ShawnAdministrator
(KiX Supporter)
2003-07-05 09:00 PM
Re: Kixforms 2.3.0 Beta 3 Build 41 Special Build 2

ja, good idea. Since I want (to try) to be a bit more carefull going forward in terms of dotnet compatibilty, lets compare your suggestion (which I like) with the quasi-dotnet version ... which you may or may not like:

Every object that can generate a keyboard event (like OnKeyDown, OnKeyPress, OnKeyUp) has a property called "KeyEventArgs" that returns a KeyEventArgs object. This object has the following properties:

KeyEventArgs.Alt
KeyEventArgs.Shift
KeyEventArgs.Control
KeyEventArgs.KeyCode
KeyEventArgs.KeyData
KeyEventArgs.KeyValue

For example, the "Alt" property returns a value indicating whether the ALT key was pressed. The "Control" property returns a value indicating whether the CTRL key was pressed. The KeyCode, KeyData and KeyValue properties return info about what key was pressed.

Looking at some MSDN examples, kixscript would look like:

$e = $Form.KeyEventArgs

If $e.KeyCode = ASC("A") And ($e.Alt Or $e.Control OR $e.Shift)
; ..
EndIf

Dotnet developers (and dotnet function prototypes) always seem to want to "cast" xxxEventArgs to a variable called "e". But long story short, this is the dotnet way of things, but the way you suggest is more straight-forward I think, but the again, when I deviate from things it always tends to bite me latter [Wink] Thoughts Erik ?

-Shawn


kholm
(Korg Regular)
2003-07-05 10:19 PM
Re: Kixforms 2.3.0 Beta 3 Build 41 Special Build 2

Shawn,

I appreciate your effords to make KiXforms .net compatible.

This gives others (me [Wink] ) a chance to see/understand some of the 'weird' ways of programming methods we have to use today.

By following a lot of threads on this board i had learned a lot about AD before implemting it.

For this reason,
I believe that you should stay as close to .net syntax as possible.

This way it is easyer to convert VB-code to KiX-code and reverse, also esyer to understand both kinds of code-ways.

I think you should stay on the .net road and disregard my 'oldfasion' way of keeping the code small.
This way we can stil benefit of the willingness of the members on KiXtart.org to share knowledge and learn something of M$ world at the same time.

-Erik