Click here to Skip to main content
13,407,398 members (54,500 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I m using Visual Studio 2008 framework 3.0,

I have created a editor in windows form with web browser control and adding html tags to it and saving to database.... and i m able edit text and enter text in web browser control in Windows XP, In windows 7 i m unable to enter single letter into it.. please help me to over come this problem...
Posted 11-Oct-11 0:48am
Updated 11-Oct-11 1:45am
SAKryukov 11-Oct-11 11:26am
Who knows where did you screw up? Make a code sample (as small as you can) manifesting your problem and post it using "Improve question".
fgrimm 19-Oct-11 19:23pm
another source of the problem might be an other version of internet explorer the setting for active-x ....
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

i have got the solution

A Windows Forms based text editor with HTML output[^]

Need to add code in the editor.cs and you can find code in the comments in the above link.

private void theBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
// Existing Code here....

HTMLDocument HTMLDocument =

((HTMLDocumentEvents2_Event)HTMLDocument).onkeypress += new


private bool On_KeyPressEvent(mshtml.IHTMLEventObj e)
if (e.ctrlKey &&
(e.keyCode == 86 || e.keyCode == 118))
return true;
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

'Try this coding to be added
'This is due to some control conflict between the internet explorer and Windows OS

Private Sub webBrowser1_DocumentCompleted1(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles webBrowser1.DocumentCompleted
If webBrowser1.Version.Major >= 9 Then
doc.designMode = "On"
End If
End Sub

'for C#.NET
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
if (webBrowser1.Version.Major >= 9)
doc.designMode = "On";

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02-2016 | 2.8.180212.1 | Last Updated 30 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100