문제

I have a picturebox in my form that I can move around with my arrow keys, but when I click on a button the form loses focus. How do i get the focus back to the form?

I've already tried with this.focus(); but it didn't work.

Any suggestions?

도움이 되었습니까?

해결책

This seems to make the Button loose the focus to the form.

    private void button1_Click(object sender, EventArgs e)
    {
        this.ActiveControl = null;
    }
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top