Windows Develop Bookmark and Share   
 index > Windows Forms General > ITextHost (Windowless Textbox Services)
 

ITextHost (Windowless Textbox Services)

Hello everyone,

I am looking for information on implementing ITextHost to host a windowless RichText control within a winform. I have a specific need and reason for hosting the TextObjectModel instead of using a traditional textbox or richedit control.

Thanks!
andrew_1  Monday, October 03, 2005 9:25 PM
ITextHost is strictly in the domain of unmanaged C/C++ code. Windows Forms does not support windowless controls.

Hans Passant.
nobugz  Saturday, September 19, 2009 9:46 PM
I have implemented ITextHost and ITextServices as best I can figure.

Please see http://rafb.net/paste/results/KfqiX234.html for the complete code to this. It's a mess as I'm experiementing trying to get this to work, and im not paying attention to neatness ;)

When I call CreateTextServices such like...

   Dim thost As wre.ITextHost = New wre.MyTextHost(Me)
   Dim o As Object = Nothing
   wre.MainClass.CreateTextServices(Nothing, thost, o)

I recieve the following exception...

"An unhandled exception of type 'System.ExecutionEngineException' occurred in WindowsApplication1.exe"

To any onlookers, please feel free to use any of this code. If you do happen to get any of this working, PLEASE FOR THE LOVE OF PETE reply and let us know how you managed to.

Thanks!
andrew_1  Tuesday, October 04, 2005 5:20 PM
So?

what happened at the end? were you able to complete the task?

Roey
Roey  Saturday, September 19, 2009 9:29 PM
ITextHost is strictly in the domain of unmanaged C/C++ code. Windows Forms does not support windowless controls.

Hans Passant.
nobugz  Saturday, September 19, 2009 9:46 PM

You can use google to search for other answers

Custom Search

More Threads

• "Custom" MasekdTextBox - BackColor prob
• How to read multiple files from a folder?
• Dropping files on my app
• URGENT HELP - PRINT
• Find Method for a richTextBox (Help Please)
• Forms docking
• How to avoid flickers in panel....
• binding the textbox to grid
• Listbox last item
• TreeView events get lost