Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Repeated running of form
Message
From
22/01/2003 17:55:12
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00744354
Message ID:
00744536
Views:
8
This message has been marked as the solution to the initial question of the thread.
>How can you cause a form to repeatedly run?

Here's a small application model that might help:
   o1 = CREATEOBJECT( "My_Form" )
   o1.Caption = "Form 1"
   o1.Show()

   o2 = CREATEOBJECT( "My_Form" )
   o2.Caption = "Form 2"
   o2.top  = 20
   o2.Left = 20
   o2.Show()

   = MESSAGEBOX( "Press ESC to Quit" )

   ON KEY LABEL ESC CLEAR EVENTS     && End an "Event Loop"
   READ EVENTS           && Start an "Event Loop"
   ON KEY LABEL ESC

DEFINE CLASS My_Form AS Form
   ADD OBJECT txt1 AS TextBox
   ADD OBJECT cmd1 AS CommandButton WITH ;
      Top = 40, Width = 40, Caption = "Save"
   ADD OBJECT cmd2 AS CommandButton WITH ;
      Top = 40, Left = 60, Width = 40, Caption = "Close"

PROC cmd1.Click
   = MESSAGEBOX( "Record saved in " + THISFORM.Caption )

PROC cmd2.Click
   THISFORM.Release
ENDDEFINE
Previous
Reply
Map
View

Click here to load this message in the networking platform