473,386 Members | 1,773 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,386 software developers and data experts.

RichTextBox doesn't show after minimizing / restoring

I have a richtextbox that is used to update with information. That
works.

public void addTextIn(string id, string txt, Color idColor)
{
Font idFont = new Font("Arial Black", 10.0f);
Font txtFont = new Font("Verdana", 10.0f);

boxMsgIn.SelectionFont = idFont;
boxMsgIn.SelectionStart = boxMsgIn.TextLength;
boxMsgIn.SelectionColor = idColor;
boxMsgIn.SelectedText = id + " ";
boxMsgIn.SelectionColor = Color.Black;
boxMsgIn.SelectionFont = txtFont;
boxMsgIn.SelectedText = txt + Environment.NewLine;
}

However, after I minimize the whole form, and then restore - all the
contents of
the RichTextBox are gone - that were previously shown.

How do I prevent that and if text is added while the app is minimized -
how should this be done to prevent from disappearing?

Nov 17 '05 #1
3 1286
Anyone have an idea with this RichTextBox issue ?

Nov 17 '05 #2
bump

Nov 17 '05 #3

aj*******@yahoo.com wrote:
I have a richtextbox that is used to update with information. That
works.

public void addTextIn(string id, string txt, Color idColor)
{
Font idFont = new Font("Arial Black", 10.0f);
Font txtFont = new Font("Verdana", 10.0f);

boxMsgIn.SelectionFont = idFont;
boxMsgIn.SelectionStart = boxMsgIn.TextLength;
boxMsgIn.SelectionColor = idColor;
boxMsgIn.SelectedText = id + " ";
boxMsgIn.SelectionColor = Color.Black;
boxMsgIn.SelectionFont = txtFont;
boxMsgIn.SelectedText = txt + Environment.NewLine;
}

However, after I minimize the whole form, and then restore - all the
contents of
the RichTextBox are gone - that were previously shown.

How do I prevent that and if text is added while the app is minimized -
how should this be done to prevent from disappearing?


Well, there doesn't seem to be anything wrong with that particular
snippet. Perhaps you could post a short but complete program that shows
the problem? By that I mean what it says here:
<http://www.yoda.arachsys.com/csharp/complete.html>

--
Larry Lard
Replies to group please

Nov 17 '05 #4

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

Similar topics

11
by: Mad Joe | last post by:
I'm using a richTextBox for editing a source code (with Syntax Highlighting) of my own programming language... How come that myRichTextBox doesn't respond to Undo/Redo functions by using default...
2
by: JRB | last post by:
I have a thread adding lines of text to a richtextbox on my windows form about every 1 second. I want the last line of text to always be visible, which it is until the box gets filled up. The last...
3
by: **Developer** | last post by:
I need to paste an RTF non-ANSI string into a RichTextBox. I know how to do that if the string were all ANSI characters. But the text contains Unicode characters that have no ANSI equivalent. I...
12
by: M O J O | last post by:
Hi, If I inside a thread creates a RichTextBox and only use this inside the thread, will there be any thread problems? I need to convert between Text and RTF inside a thread. Thanks!! M...
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...
0
by: tcloud | last post by:
I have a RichTextBox that: - 1st would intermittently show the scroll bars but they wouldn't work - 2nd now doesn't allow any interaction even though it looks normal The application processes...
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...
1
by: Mayilsamy | last post by:
hai, hai i need some information about how to load the pdf file in richtextbox using vb.net.
2
by: =?Utf-8?B?TWFyayBDb2xsYXJk?= | last post by:
I'm currently writing an application that has a RichTextBox and a toolbar which includes the following toolbar buttons: - Font - Font Size - Bold - Italic - Underline I want the toolbox...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.