Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this form already open?
Message
 
 
To
19/11/2001 11:44:42
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00583522
Message ID:
00583541
Views:
16
I have a DOFORM method in my global app object that I call to prevent the running of the same form multiple times:
lparameters tcForm, tcFormName
if type("tcForm")  "C"
   return .f.
endif
tcForm = alltrim(tcForm)
if empty(tcForm)
   return .f.
endif
if type("tcFormName") = "C"
   tcFormName = alltrim(upper(tcFormName))
else
   tcFormName = ""
endif
local llFound, i
llFound = .f.
i = 0
if !empty(tcFormName)
   for i = 1 to _screen.formcount
      if upper(_screen.forms(i).name) = tcFormName
         llFound = .t.
         exit
      endif
   endfor
endif
if llFound
   _screen.forms(i).Show()
else
   do form (tcForm)
endif</font
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform