this guy과 같은 문제가 있지만 그의 게시물은 2 세이므로 새로운 것을 열 수 있다고 생각했습니다.Windows.Forms 니모닉이 작동하지 않습니다
프로그램에서 나는 레이블을 사용하고 발견 한대로 mnemonics on labels trigger the enter
event of the next control in the tab order입니다. 따라서 click
및 enter
메소드가 구현되었습니다. 그러나 여기에 문제가 있습니다. 테스트 프로그램을 만들었습니다. 이 프로그램은 단추와 텍스트 상자라는 두 개의 레이블로 구성되어 있습니다.
두 번째 레이블은 enter
이벤트가 발생하면 바로 제어하는 것입니다. ALT
을 누르면 밑줄이 잘 표시되지만 두 번째 키 (Reset
)를 누르면 아무 일도 발생하지 않습니다. 또한 밑줄이 나타나고 ALT
키를 다시 누르면 그는 사라지지 않으며 ALT
을 눌렀다면 button
은 완전히 무시됩니다. VisualStudio 2013을 사용하여 다른 PC로 이동했지만 동일한 결과가 나타납니다. VisualStudio 2017을 다운로드하고 새 프로그램을 만들려고했습니다 =>는 작동하지 않습니다.
영어가 내가 가장 잘 알고있는 언어가 아니므로, 내가 잘못 생각할 때 힌트를 줄 수 있다면 기쁩니다. 누군가 나를 도울 수 있기를 바랍니다.
Form1.cs를
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;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void reset_Click(object sender, EventArgs e)
{
textBox.Text = "";
}
private void button_Click(object sender, EventArgs e)
{
textBox.Text = "Button";
}
private void nothing_Enter(object sender, EventArgs e)
{
textBox.Text = "nothing";
}
}
}
Form1.designer.cs입니다은
this.reset.Click += new System.EventHandler(this.reset_Click);
this.button.Click += new System.EventHandler(this.button_Click);
this.nothing.Enter += new System.EventHandler(this.nothing_Enter);
너무 많은 텍스트입니다. 게시물을 최대한 줄여서 핵심 정보 만 제공하여 문제를 이해하고 재구성하십시오. –
나는 그것을 할 것이다. – John
이제 더 나아 졌습니까? – John