Not quite that easy. The lock file is actually a database format file you could read (* in read-only mode) that might give you some hints as to who is there right now. But no guarantees.
I usually did this another way, though it was still clunky. I included an audit log via my startup form. The startup form wrote a record "User XYZ entering at dd-mmm-yyyy hh:nn:ss" when it loaded and another record "User XYZ exiting at dd-mmm-yyyy hh:nn:ss" when it closed. Then I just looked for "Enter" without corresponding "Exit". I also made it a sliding window of only entries for the last 24 hours, so that I wouldn't have to go through a raft of properly paired enter/exit records for the last two months or so. That worked most of the time except after a network disaster. (Which is why I limited things to 24 hours.)
The catch is that the Startup form cannot go away. You just minimize it and make it invisible. Then when the user tries to exit, the form closes, visible or not.