Click here to Skip to main content
15,887,135 members
Home / Discussions / C#
   

C#

 
GeneralRe: adding controls to an invisible control Pin
Luc Pattyn17-Sep-07 23:50
sitebuilderLuc Pattyn17-Sep-07 23:50 
AnswerRe: adding controls to an invisible control Pin
Big Daddy Farang18-Sep-07 7:37
Big Daddy Farang18-Sep-07 7:37 
GeneralRe: adding controls to an invisible control Pin
cignox118-Sep-07 20:37
cignox118-Sep-07 20:37 
GeneralRe: adding controls to an invisible control Pin
Big Daddy Farang19-Sep-07 7:28
Big Daddy Farang19-Sep-07 7:28 
QuestionDatabase problem Pin
Nishad8517-Sep-07 20:45
Nishad8517-Sep-07 20:45 
AnswerRe: Database problem Pin
Paul Conrad23-Sep-07 6:44
professionalPaul Conrad23-Sep-07 6:44 
QuestionRichTextBox Pin
mihksoft17-Sep-07 20:22
mihksoft17-Sep-07 20:22 
AnswerRe: RichTextBox Pin
wienzzz17-Sep-07 22:27
wienzzz17-Sep-07 22:27 
Hai mihk, I'm working on similar application also.

In my opinion, you can do that on 2 ways.
1. scan through the first char loop until end, when you find "SPACE" / "32" in ASCII, you just put a little code of RTF Formatting. well, let's just say like this.

<br />
StringResult = "";<br />
//this is the header for RTF-format<br />
StringResult = {\rtf\ansi {\colortbl; \red0\green0\blue255;\red255\green0\blue0;}; <br />
//2 color, Blue and Red<br />
bool toggle = false;<br />
for(int i=0; i < YourString.GetLength(0); i++)<br />
{<br />
    if(toggle)<br />
    {<br />
        StringResult = StringResult + @"\cf1";<br />
    }<br />
    else<br />
        StringResult = StringResult + @"\cf2";<br />
<br />
    StringResult = StringResult + YourString[i];<br />
<br />
    if(YourString[i] == (char)32)<br />
    {<br />
    //toggle the boolean <br />
       if(toggle) toggle = false;<br />
       else toggle = true;<br />
    }<br />
}<br />

you may search more about RTF formatting on microsoft web site.


2. you can just use the method RTB.Selection to change the font, forecolor, backcolor, etc. find more info about this on MSDN help.

CMIIW
QuestionHow Yahoo messenger photo sharing works Pin
Lilupa17-Sep-07 20:20
Lilupa17-Sep-07 20:20 
QuestionGetting a variant containing safe array of Double Values from MFC ActiveX in C#? Pin
ss43117-Sep-07 20:11
ss43117-Sep-07 20:11 
AnswerRe: Getting a variant containing safe array of Double Values from MFC ActiveX in C#? Pin
Nissim Salomon18-Sep-07 1:40
Nissim Salomon18-Sep-07 1:40 
GeneralRe: Getting a variant containing safe array of Double Values from MFC ActiveX in C#? Pin
ss43118-Sep-07 19:30
ss43118-Sep-07 19:30 
GeneralRe: Getting a variant containing safe array of Double Values from MFC ActiveX in C#? Pin
Nissim Salomon20-Sep-07 13:54
Nissim Salomon20-Sep-07 13:54 
GeneralRe: Getting a variant containing safe array of Double Values from MFC ActiveX in C#? Pin
venkyhyd5-Oct-08 20:14
venkyhyd5-Oct-08 20:14 
QuestionWhere can call reports in layers "tier" Pin
Rami Said Abd Alhalim17-Sep-07 19:57
Rami Said Abd Alhalim17-Sep-07 19:57 
Questioncheck to see if a specified file exist in a specified directory Pin
pavya_Cool17-Sep-07 19:19
pavya_Cool17-Sep-07 19:19 
AnswerRe: check to see if a specified file exist in a specified directory Pin
Kuldeep Antil17-Sep-07 19:51
Kuldeep Antil17-Sep-07 19:51 
GeneralRe: check to see if a specified file exist in a specified directory Pin
pavya_Cool17-Sep-07 19:54
pavya_Cool17-Sep-07 19:54 
AnswerRe: check to see if a specified file exist in a specified directory Pin
Nissim Salomon17-Sep-07 20:18
Nissim Salomon17-Sep-07 20:18 
GeneralRe: check to see if a specified file exist in a specified directory Pin
pavya_Cool17-Sep-07 20:21
pavya_Cool17-Sep-07 20:21 
AnswerRe: check to see if a specified file exist in a specified directory Pin
ramdil20-Sep-07 1:10
ramdil20-Sep-07 1:10 
QuestionSQL Joins Pin
iet200017-Sep-07 19:09
iet200017-Sep-07 19:09 
AnswerRe: SQL Joins Pin
Rami Said Abd Alhalim17-Sep-07 19:50
Rami Said Abd Alhalim17-Sep-07 19:50 
GeneralRe: SQL Joins Pin
iet200017-Sep-07 20:33
iet200017-Sep-07 20:33 
QuestionVirtual Function Pin
.NET- India 17-Sep-07 18:57
.NET- India 17-Sep-07 18:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.