#86443 - 2002-07-10 10:29 PM
Re: Kixforms - BBChecker II
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
I hear yeah bud. plan is to continue enhancing forms1 until your satisfied with BBChecker2, then I would like the opportunity to port over to TNG ... but like I said, I'm kinda following along with you, as you develop it further ...
Sleep and options settings ? Maybe as a headstart, here's a bastardized version of the optionbox from that PiXaso Paint script a while back ... with a few mods for setting a sleep value ... guess you could save state in the Registry with an optionbox strategy ?
code:
break on
$sleep = 20
$form = createobject("kixtart.form") $form.width = 300 $form.height = 300
$setup = $form.commandbutton("Options",,,75,25) $setup.center $setup.onclick = "Options()" $setup.default = 1
$form.center $form.show while $form.visible $=execute($form.doevents) loop
?"sleep=" $sleep
exit 1
function options()
dim $form,$delay,$ok,$cancel dim $okayed $okeyed = 0 dim $canceled $canceled=0
; Changes global variable $sleep
$form = createobject("kixtart.form") $form.caption = "Options" $form.width = 250 $form.height = 150
$form.printxy(20,20,"Enter delay value:")
$delay = $form.textbox($sleep,20,40,100,20)
$ok = $form.commandbutton("OK",150,20,75,20) $ok.onclick = "$$okayed=1"
$cancel = $form.commandbutton("Cancel",150,$Ok.Bottom+10,75,20) $cancel.onclick = "$$canceled=1" $cancel.default = 1
$form.center $form.show while $form.visible and not $okayed and not $canceled $=execute($form.doevents) loop if $okayed $sleep = val($delay.text) endif endfunction
Actually, if one obeys proper Kixtart SCOPING rules, you can actually have TWO forms named $FORM ... a GLOBAL one, and a local one ... the UDF $FORM gets created and properly destroyed and recreated with each invocation ... but when doing this, have to insure that ALL $CONTROLS are dimmed LOCALLY to UDF ... else, no worky ...
|
Top
|
|
|
|
#86446 - 2002-07-11 04:53 AM
Re: Kixforms - BBChecker II
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
okee-dokee Jooel, OnGotFocus and OnLostFocus is implemented ... was testing using this script:
code:
Break On $Form = CreateObject("Kixtart.Form") $Form.Caption = "Kixforms..." $Form.Width = 300 $Form.Height = 200 $Form.OnGotFocus = '$$Form.Caption = "GOT FOCUS"' $Form.OnLostFocus = '$$Form.Caption = "LOST FOCUS"' $Exit = $Form.CommandButton("Exit",,,100,25) $Exit.OnClick = "Quit()" $Exit.Center $Form.Show(1) While $Form.Visible $=Execute($Form.DoEvents) Loop Exit 1
As one shifts the keyboard focus from window-to-window, watch the Kixforms titlebar for focus change information ...
Kixforms available here: Kixforms Build 19
|
Top
|
|
|
|
#86448 - 2002-07-11 08:52 AM
Re: Kixforms - BBChecker II
|
Bryce
KiX Supporter
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
A quick note about the $obj = createobject("microsoft.xmlhttp")
It comes with IE5.
code:
$Obj = createobject("microsoft.xmlhttp")
if @Error <> 0 exit(@error) endif
$obj.open("GET", "http://www.yahoo.com", -1) $obj.send while $obj.readystate <> 4 sleep(0.2) loop
? $obj.responsetext
Bryce
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 918 anonymous users online.
|
|
|