Locking Windows Session From Xojo

Hi All,

I´m trying to make a program that directly lock down the Windows Session. I´ve tried to do this simulating the press down “Windows+L” keys with MBS plugin, but Windows Key is not working (key code 91). Do I need to have some into account in order to simulate the winkey ??

By the other hand, is there another way to lock the windows session from Xojo ??

Best regards

You mean LockWorkStation function?

Declare Function LockWorkStation Lib "User32.dll" () As Int32
Call LockWorkStation()

Great !! A lot of thanks.
I didn´t knew I could call that dll. This open a wide door for me!!

A lot of thanks again!!