Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

WPF textbox not able to type anything when open up the 3rd window

$
0
0

Hi,

I have created 2 project

i) Window Form Application

ii) WPF Application

under window Form Application there is a form; named: Form1

Under WPF Application there are 2 forms; named: WPFWindow1 andWPFWindow2

The scenario will be:

Window Application

1) Form1 startup with  button1,

2) Form1's Button click, WPFWindow1 open up.

WPF Application

1) WPFWindow1 contain button2,

2) WPFWindow1's Button click, WPFWindow2 open up.

3) WPFWindow2 contain textbox1 for entry.

Sequence:-

Form1 --> WPFWindow1 --> WPFWindow2-->Textbox

Problem:

- the textbox in WPFWindow2 is not accepting any keyboard input except space bar & backspace.

I have include ElementHost.EnableModelessKeyboardInterop in Form1 ,and WPFWindow1's textbox is able to accept keyboard input, the problem only occurs on the 2nd window(WPFWindow2) which is call up from WPFWindow1 .

When I swap the sequence of WPFWindow2 to WPFWindow1, the textbox in WPFWindow2 is working fine, so I assume it's not the problem with WPFWindow2.

Any1 can help?

Thanks.

Regards,

Kong CA




Viewing all articles
Browse latest Browse all 12583

Trending Articles