Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Caliing a Non Modal form
Message
From
13/05/2006 12:40:09
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01121669
Message ID:
01121672
Views:
9
>I have 2 issues:
>1. When I close formA I wlays want FormB to close (otherwise it would be left dangling)

>2. Before I call FormB, it would be nice If I could identify if its already there, if It is just show it, otherwise do a Do Form

Just add a property ChildForm to FormA to store reference to FormB and set default value to .Null. For example this code will create/show FormB:
IF ISNULL(ThisForm.ChildForm) &&FormB is not created
  DO FORM "FormB.scx" NAME ThisForm.ChildForm LINKED &&Create child form and store reference
 ELSE
  ThisForm.ChildForm.Show() &&Show the form
ENDIF
Because form is created with LINKED option it will be automatically released if FormA is released.
/A new technology turns into completely outdated stuff before you have a time to read "Getting Started..." section.
/If there are some "system programmers" then others are unsystematic.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform