KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

How to Combine a While VISIBLE and an Execute command.

 
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion
View previous topic :: View next topic  
Author Message
MACE1
KiXforms Enthusiast
KiXforms Enthusiast


Joined: 12 Oct 2004
Posts: 130
Location: Manchester UK

PostPosted: Wed Jul 16, 2008 9:54 am    Post subject: How to Combine a While VISIBLE and an Execute command. Reply with quote

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
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Wed Jul 16, 2008 2:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Wed Jul 16, 2008 2:16 pm    Post subject: Reply with quote

By the way, thats a kixforms classic example ...
Back to top
View user's profile Send private message
MACE1
KiXforms Enthusiast
KiXforms Enthusiast


Joined: 12 Oct 2004
Posts: 130
Location: Manchester UK

PostPosted: Wed Jul 16, 2008 2:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Wed Jul 16, 2008 8:46 pm    Post subject: Reply with quote

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 Very Happy

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Wed Jul 16, 2008 9:28 pm    Post subject: Reply with quote

Ja. You the "execute-tioner" ... and a smoker too eh (me too Wink )
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group