본문 바로가기

VB.net106

Windows 작업관리자 차단 및 Alt+F4 키 차단 Protected Overrides Function ProcessDialogKey(ByVal keyData As System.Windows.Forms.Keys) As Boolean Select Case (keyData) Case Keys.Control Return True Case Keys.Alt Or Keys.F4 Return True End Select Return MyBase.ProcessDialogKey(keyData) End Function Private Sub DisableTaskManager() Dim regkey As RegistryKey Dim keyValueInt As String = "1" Dim subKey As String = "Software\Microsoft\Windows\Cu.. 2021. 6. 3.
키보드 후킹(Hooking)을 통한 HomeKey 방지 '===================== 키보드 Hook을 통한 Window Home 키 입력 방지 Private Const WM_KEYUP As Integer = &H101 Private Const WM_KEYDOWN As Short = &H100S Private Const WM_SYSKEYDOWN As Integer = &H104 Private Const WM_SYSKEYUP As Integer = &H105 Public Structure KBDLLHOOKSTRUCT Public vkCode As Integer Public scanCode As Integer Public flags As Integer Public time As Integer Public dwExtraInfo As Integer End.. 2021. 6. 3.
InitiateSystemShutdown 선언: C# [DllImport("advapi32")] public static extern Int32 InitiateSystemShutdown(String lpMachineName, String lpMessage, Int32 dwTimeout, Boolean bForceAppsClosed, Boolean bRebootAfterShutdown); VB.NET _ Public Shared Function InitiateSystemShutdown(lpMachineName As [String], lpMessage As [String], dwTimeout As Int32, bForceAppsClosed As [Boolean], bRebootAfterShutdown As [Boolean]) As Int32 End.. 2021. 4. 28.
x86, x64 모두 사용 가능한 cmd Dim result_Cmd As New RichTextBox Dim output As String Dim ptr As IntPtr = New IntPtr() Wow64DisableWow64FsRedirection(ptr) Dim info As ProcessStartInfo = New ProcessStartInfo() Dim proc As Process = New Process() With info .RedirectStandardOutput = True .UseShellExecute = False .FileName = "cmd.exe" .Arguments = "/c query session /vm" End With proc.StartInfo = info proc.Start() output = proc.St.. 2021. 3. 31.