c# - WebBrowser control stops focus on richtextbox -


i have problem webbrowser component. reason, when click it, disables me setting focus on richtextbox.

i have 2 same forms.

main difference between first , second form is, form1 modifying webbrowser documenttext , form2 using webbrowser display content of temporary file.

first form working well, webbrowser not disabling focus on richtextbox. second form problematic one. when click webbrowser component, , richtextbox, never gains focus focus() method again :(

i solved :) added while loop waits, until webbrowser.document property initialized. used webbrowser.document.createelement creating new html elements, , webbrowser.document.body.appendchild adding them document. (i stopped using temporary file...)


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -