>What would be the best way to count how many users are using my app at the same time?
>
>I want to control how many persons can use my app.
>
>I'd prefer pure vfp code as much as possible. But in the long run as long it works I'll be happy.
This would probably assume you have some kind of authentication. By doing that, you could log when a login is done and act accordingly. Or, you could have some kind of hit mechanism to log the latest actions from users so you could log that into a table and use a select to get the active users for the last 5 minutes, for example. If you would have some kind of direct connection, such as an open channel, then, this would be probably easier to achieve.
In a desktop application, it would be a little bit more difficult to achieve that task as you would probably not have a single point of entry. In a Web application, as every hit goes through the same path, it makes it easier to achieve such feature.