Showing posts with label 【Visual Studio Visual Csharp】OS function logoff. Show all posts
Showing posts with label 【Visual Studio Visual Csharp】OS function logoff. Show all posts

Monday, May 31, 2021

【Visual Studio Visual Csharp】OS function logoff,restart,shutdoen the system

 using System;

using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Runtime.InteropServices; // make sure that using System.Runtime.InteropServices; is included using System.Diagnostics; // make sure that using System.Diagnostics; is included namespace osfunctionC { public partial class Form1 : Form { public Form1() { InitializeComponent(); } [DllImport("user32.dll")] public static extern int ExitWindowsEx(int operationFlag, int operationReason); private void button1_Click(object sender, EventArgs e) { // Log off the System ExitWindowsEx(0, 0); } private void button2_Click(object sender, EventArgs e) { // Restart the System ExitWindowsEx(2, 0); } private void button3_Click(object sender, EventArgs e) { // Shut Down the System ExitWindowsEx(1, 0); } } }

Why Most Biotech GTM Strategies Fail: A Framework for 8 Biotech Business Models

TDiscover why biotech startups need different GTM strategies based on their business model. Explore 8 biotech business models and commerc...