473,320 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

RichTextBox Error

Hi,

I'm developing an app that uses a RichTextBox, and populates it with
colour formatted text at Form Load. However, I randomly receive this
error, which I believe is related to this data population:

Unhandled Exception: System.NullReferenceException: Object reference
not set to an instance of an object.
at System.Windows.Forms.RichTextBox.EditStreamProc(In tPtr dwCookie,
IntPtr buf, Int32 cb, Int32& transferred)
at System.Windows.Forms.UnsafeNativeMethods.CallWindo wProc(IntPtr
wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Messa ge& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
at System.Windows.Forms.RichTextBox.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.PeekMessa ge(MSG& msg,
IntPtr hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)

Does anyone have any insight into this? I've googled to no avail so
far.

TIA
Nov 15 '05 #1
0 918

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Terminal882003 | last post by:
Hi, I have a problem in my application(C#) if I using RichTextBox to continuously display a series of text messages (using method AppendText()). When application is running, it will stop at some...
2
by: KenH | last post by:
I am getting an unhandled system exception while writing to a RichTextBox. The process may run for a few hours or days before the error is generated The message is "Cannot access a disposed object...
1
by: Nathan Carroll | last post by:
In an mdi environment I constructed a child for with a richtextbox control that is used to load .rtf's. This works fine on the intiatial load of the form but when for is closed and reopened later...
1
by: vertigo | last post by:
Hello I have some Threads, and they write something to RichTextBox.Text property. But sometimes i receive error: ************** Exception Text ************** System.NullReferenceException:...
2
by: Neo Chou | last post by:
Greetings! I'm trying to make my ASPX page able to process WORD format document. I learned that RichTextBox might help me, but I can't use it either by adding it to my Web Control list or by...
1
by: Eric | last post by:
Using the 1.1 framework. We are using a newly created instance of a RichTextBox Class in our server code to manipulate RTF that is stored in the database. To clarify, we are not using or...
0
by: y2k692hu | last post by:
Hello I am trying to run this and I keep getting a "SystemNullReferenceException: Object reference not set to instance of an object" error. I have three menu items bold, italic and underline. When i...
9
by: James Wong | last post by:
Hi, I use the RichTextBox in my program. It will use different language in this RichTextBox (chinese and english characters), and it set the "DualFont" and use different fonts. By the way, how...
5
by: Andrus | last post by:
I use Winforms RichTextBox control to edit scripts. Scripts are plain ascii texts. When error occurs, script engine returns character position of error in code as integer. How to position...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.