Home > Net >  C # modal dialog box for the input focus problem
C # modal dialog box for the input focus problem

Time:09-27

C #, in A form, click A button to use ShowDialog () open the child Windows, child window opens, input focus is still on A window just click on the button, could you tell me this is what causes?
I expect is the child Windows, input focus is transferred to the specified child window controls,

CodePudding user response:

Enclosing ActiveControl=your control
Your control. The focus ()

CodePudding user response:

Then you in the load event in a child window,
Controls. The Focus ()

CodePudding user response:

reference 1st floor asq985 response:
enclosing ActiveControl=your control
Your control. The focus ()


Is child window without gains focus, don't know what's wrong,
  •  Tags:  
  • C#
  • Related