B4J Question lock and unlock windows screen

Duque

Active Member
Licensed User
Longtime User
I'm trying to build a Cyber Control, but I want the machines to be controlled with an app with B4A, I get the problem that I do not know how I can do with b4j to lock the windows screen and unlock it, any ideas?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Lock windows:
B4X:
Dim shl As Shell
shl.Initialize("shl", File.Combine(GetEnvironmentVariable("windir", ""), "System32\rundll32.exe"), Array("user32.dll,LockWorkStation"))
shl.Run(-1)
Wait For (shl) shl_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
Log(Success)

I don't think that it is possible to unlock the screen programmatically.
 
Upvote 0

Duque

Active Member
Licensed User
Longtime User
I think I did not explain, what I need is to maximize a form of b4j and hide the taskbar windows, that this form is the only thing that is seen on screen and that can not be closed in any way only with the application B4A that in fact I already have the logic.

Is it necessary to make another thread?
 
Upvote 0
Top