【VISUAL VB NET】Lock Screen

 Public Class Form1

Dim cmdProcess As Process = New Process() Dim fileArgs As String Dim path As String = "C:\Windows\System32\" Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click fileArgs = "user32.dll,LockWorkStation" cmdProcess.StartInfo.Arguments = fileArgs ' cmdProcess.StartInfo.WorkingDirectory = path cmdProcess.StartInfo.FileName = "RunDll32.exe" cmdProcess.Start() cmdProcess.WaitForExit() Me.Show() End Sub End Class

No comments:

Top 3 UX Design Articles of 2024 to Remember

Based on most subscriptions ͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­...

Contact Form

Name

Email *

Message *