매크로2 [C#] F1을 누르면 메세지 박스가 실행되는 프로그램 private void Form1_Load(object sender, EventArgs e) { this.KeyPreview = true; this.KeyDown += new KeyEventHandler(Form1_KeyDown); } void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode.ToString() == "F1") { MessageBox.Show("F1 pressed"); } } 2021. 3. 16. [C#] 키보드 출력을 이용한 매크로 docs.microsoft.com/en-us/dotnet/api/system.windows.forms.sendkeys.send?redirectedfrom=MSDN&view=net-5.0#System_Windows_Forms_SendKeys_Send_System_String_ SendKeys.Send(String) Method (System.Windows.Forms) Sends keystrokes to the active application. docs.microsoft.com 11cc.tistory.com/8 Namespace: System.Windows.Forms SendKeys.Send("A"); //A키 입력 SendKeys.Send("{enter}"); //Enter키 입력 SendKey.Send.. 2021. 3. 16. 이전 1 다음