ベストアンサー
このベストアンサーは投票で選ばれました
以下でいけるかと思います。 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Runtime.InteropServices; namespace WindowsFormsApplication1 { public partial class Form1 : Form { [DllImport("user32.dll")] public static extern uint keybd_event(byte bVk, byte bScan, uint dwFlags, UIntPtr dwExtraInfo); public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { keybd_event((byte)Keys.LWin, 0, 0, (UIntPtr)0); keybd_event((byte)Keys.D, 0, 0, (UIntPtr)0); keybd_event((byte)Keys.D, 0, 2, (UIntPtr)0); keybd_event((byte)Keys.LWin, 0, 2, (UIntPtr)0); } } }
NEW! この回答はいかがでしたか? リアクションしてみよう