List Of Snippets With Tag: "lock"

Prevent Event To Take Action in Miscellaneous

Taken from http://forum.stormweb.no/index.php/topic,441.msg1196.html#msg1196
This one will prevent SpinBox's _Change to action

PUBLIC SUB Form_Open()
  OBJECT.LOCK(SpinBox1)
  SpinBox1.Value = 50
  OBJECT.UNLOCK(SpinBox1)
END

Posted: 2008.09.15 18:53 | By: silent | 0 comments

Howto lock file in Files and Directories

by Benoit in gambas-user mailing list

DIM hFile AS File

TRY hFile = LOCK "~/lock"
IF ERROR THEN
 PRINT "Already locked by something else!"
ELSE
 PRINT "Got locked!"

 UNLOCK hFile
ENDIF

Posted: 2008.10.05 19:23 | By: silent | 0 comments

1