Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
I was wondering how to make a program automatically do a fast user switch. What i want is something that will go off and switch user after a certain time.

 

Note: I didn't test them myself.

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=1257&lngWId=10

http://www.vb-helper.com/howto_net_detect_fast_user_switch.html

Don't ask what your country can do for you, ask what you can do for your country...
Posted

Thanks, the first one worked really well,

 

You basically put:

Private Declare Function LockWorkStation Lib "user32.dll" () As Long

At the top of your code

 

And:

LockWorkStation()

In your code where you want the fast user switch to occur.

  • Leaders
Posted
It is worth mentioning that if the user has the welcome screen disabled or they are running windows NT/2000+ (anything NT except XP) LockWorkStation will do just that: lock the work station.
[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...