Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.paradox    |    To crash or not to crash, asks Borland    |    9,834 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 9,306 of 9,834    |
|    Robert Wiltshire to All    |
|    Re: Preventing a form from opening a sec    |
|    29 Jul 08 00:10:09    |
   
   From: nomail@nospam.com   
      
   > Sorry for jumping in late, but why not have a stub form that you open.   
   > All   
   > it does is check to see if your main form is open. If it is, it uses it.   
   > If not, it opens it. Either way, the stub form then immediately closes.   
   > Sounds simple?   
      
   Sure....and I do appreciate all suggestions,   
   but as Rick surmised I really wanted to have the code in the form itself,   
   due to various reasons.   
      
   In the opening paragraph of the initial posting,   
   I think you will find that I was aware of what you were mentioning,   
   but desired it to be internal to the form,   
   and not in an external script,library, or form.   
      
   Thank you for the suggestion.   
      
      
   I did post my final solution on 7/27/2008,   
   which ended up being about 30 lines of code,   
   which is small enough for what I was hoping to do.   
      
   I have since created a custom object,   
   which I do by placing a box object on a form,   
   and then I place custom code in it.   
   I name my object, with a "co" prefix (Custom Object),   
   and then I put the code for this method into the object.   
   Also, I modify property of an object to make it not visible at run time.   
      
   I then added the object to my object repository,   
   ( a blank form located somewhere).   
      
   Inside the code of the method in the custom object,   
   some may find this an interesting technique.   
      
   I comment out sample calling code,   
   between the method declaration line and the opening var as follows:   
      
      
   method isFormOpeningAlreadyOpen() logical   
      
   sample code to be cnp to form init method   
   {   
   if coOneInstance.isFormOpeningAlreadyOpen() then   
    eventInfo.setErrorCode(canNotArrive)   
    close()   
    return   
    endif   
   }   
      
   var   
   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca