Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Run only one instance of a form
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00830081
Message ID:
00830094
Views:
25
This message has been marked as a message which has helped to the initial question of the thread.
place the following code in the init of the form.
with _screen
 for lnI = 1 ti .formCount
  do case
    case .forms[lnI].name = this.name and .forms[lnI].visible
     * Found another form with same name and it is visible...
     * 
     .forms[lnI].show()

    case .forms[lnI].name = this.name and NOT .forms[lnI].visible
      * form exists but it's invisible so make it visible.
      *
      .forms[lnI].visible = .T.
      .forms[lnI].setfocus()
   endcase
  endfor
endwith
.......
DO WHILE .T.
      ME.Work()
ENDDO
Previous
Reply
Map
View

Click here to load this message in the networking platform