Showing posts with label 【VISUAL VB NET】Monitor StandBy. Show all posts
Showing posts with label 【VISUAL VB NET】Monitor StandBy. Show all posts

Friday, 23 April 2021

【VISUAL VB NET】Monitor StandBy

 Imports System

Imports System.Collections.Generic Imports System.ComponentModel Imports System.Data Imports System.Drawing Imports System.Linq Imports System.Text Imports System.Threading.Tasks Imports System.Windows.Forms ' make sure that using System.Diagnostics; is included Imports System.Diagnostics ' make sure that using System.Security.Principal; is includeda Imports System.Security.Principal ' make sure that using System.Runtime.InteropServices; is included Imports System.Runtime.InteropServices Public Class Form1 Private SC_MONITORPOWER As Integer = &HF170 Private WM_SYSCOMMAND As UInteger = &H112 <DllImport("user32.dll")> _ Private Shared Function SendMessage(hWnd As IntPtr, Msg As UInteger, wParam As IntPtr, lParam As IntPtr) As IntPtr End Function Public Sub New() MyBase.New() InitializeComponent() End Sub Private Sub button1_Click(sender As Object, e As EventArgs) Handles button1.Click SendMessage(Me.Handle, WM_SYSCOMMAND, CType(SC_MONITORPOWER, IntPtr), CType(2, IntPtr)) End Sub Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load End Sub End Class

BREAKING: North Carolina automotive group acquires 7 Upstate dealerships

Breaking news from GSA Business Report Click here to view this message in a browser window. ...