View previous topic :: View next topic |
Author |
Message |
MACE1 KiXforms Enthusiast


Joined: 12 Oct 2004 Posts: 130 Location: Manchester UK
|
Posted: Wed Jul 16, 2008 9:54 am Post subject: How to Combine a While VISIBLE and an Execute command. |
|
|
I have built a general purpose form creator where you provide a 'Name' and parameters for the form to create. Then I want to do the ...
while $myform.visible
$=Execute($myform.DoEvents())
loop
However in this general purpose scheme we use the execute() to resolve the form name. I am not having much luck getting the syntax to work here.
Code: |
$ = Showform("MYFORM")
;---------------------------------------------
Function ShowForm($MN)
Dim $Form
$Form='Form_'+$MN
$ = execute("$$$Form.Show") ; Works fine
while execute("$$$Form.Visible") ; HELP !
$Nul = Execute("$$Form.DoEvents()") ; HELP !
Loop
EndFunction
|
________
Jaguar x-type picture
Last edited by MACE1 on Fri Feb 18, 2011 5:20 pm; edited 1 time in total |
|
Back to top |
|
 |
Shawn KiXforms Developer


Joined: 22 Feb 2003 Posts: 1983 Location: Canada
|
Posted: Wed Jul 16, 2008 2:15 pm Post subject: |
|
|
Think you might need something like a $Visible variable in there, like:
Code: |
Break On
$System = CreateObject("Kixtart.System")
$Form_Shawn = $System.Form()
$Form_Shawn.Width = 640
$Form_Shawn.Height = 480
$ = Showform("Shawn")
?"Done..."
Exit 0
Function ShowForm($MN)
Dim $Form
Dim $Visible
Dim $Nul
$Form = 'Form_' + $MN
$ = Execute("$$$Form.Show") ; Works fine
$Visible = 1
While $Visible
$= Execute("$$Visible = $$$Form.Visible") ; HELP !
$Nul = Execute("$$Form.DoEvents()") ; HELP !
Loop
EndFunction
|
|
|
Back to top |
|
 |
Shawn KiXforms Developer


Joined: 22 Feb 2003 Posts: 1983 Location: Canada
|
Posted: Wed Jul 16, 2008 2:16 pm Post subject: |
|
|
By the way, thats a kixforms classic example ... |
|
Back to top |
|
 |
MACE1 KiXforms Enthusiast


Joined: 12 Oct 2004 Posts: 130 Location: Manchester UK
|
Posted: Wed Jul 16, 2008 2:22 pm Post subject: |
|
|
Just what the doctor ordered.
Thanks once again.
I'll .net it all now.
________
ZX14 VS HAYABUSA
Last edited by MACE1 on Fri Feb 18, 2011 5:20 pm; edited 1 time in total |
|
Back to top |
|
 |
Jochen KiXforms Devotee


Joined: 05 Mar 2003 Posts: 1204 Location: Stuttgart, Germany
|
Posted: Wed Jul 16, 2008 8:46 pm Post subject: |
|
|
Hehe... I once was as well on that execute()-trip.
There is only one cure: a strict avoidance strategy or a good round of golf  _________________ Jochen
Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand. |
|
Back to top |
|
 |
Shawn KiXforms Developer


Joined: 22 Feb 2003 Posts: 1983 Location: Canada
|
Posted: Wed Jul 16, 2008 9:28 pm Post subject: |
|
|
Ja. You the "execute-tioner" ... and a smoker too eh (me too ) |
|
Back to top |
|
 |
|