Windows Lock Computer

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jun 2009
Posts: 25
Reputation: zuve_fox is an unknown quantity at this point 
Solved Threads: 0
zuve_fox zuve_fox is offline Offline
Light Poster

Windows Lock Computer

 
0
  #1
Jun 13th, 2009
How to windows Lock computer using vb.net?
plz help me
thanx
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 9
Reputation: dileepkumars1 is an unknown quantity at this point 
Solved Threads: 0
dileepkumars1 dileepkumars1 is offline Offline
Newbie Poster

Re: Windows Lock Computer

 
0
  #2
Jun 14th, 2009
try this

    Private Declare Function LockWorkStation Lib "user32.dll" () As Long
    Private Declare Function ShutDownDialog Lib "shell32" Alias "#60" (ByVal any As Long) As Long

    Private Sub ShowShutdown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ShutDownDialog(0)
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        LockWorkStation()
    End Sub
Last edited by Tekmaven; Jun 15th, 2009 at 1:37 am. Reason: Code Tags
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC