Click here to Skip to main content
15,916,293 members
Home / Discussions / C#
   

C#

 
QuestionProblem with the scrollbar which is attached to a textbox Pin
kandy_soliton17-Sep-07 21:40
kandy_soliton17-Sep-07 21:40 
Questionhow to change the label value of mdi child form from non-mdi form Pin
mukesh choudhary17-Sep-07 21:14
mukesh choudhary17-Sep-07 21:14 
AnswerRe: how to change the label value of mdi child form from non-mdi form Pin
Pete O'Hanlon18-Sep-07 2:36
mvePete O'Hanlon18-Sep-07 2:36 
GeneralRe: how to change the label value of mdi child form from non-mdi form Pin
mukesh choudhary20-Sep-07 4:55
mukesh choudhary20-Sep-07 4:55 
QuestionContext Menu in List view Pin
M. J. Jaya Chitra17-Sep-07 21:14
M. J. Jaya Chitra17-Sep-07 21:14 
Questionadding controls to an invisible control Pin
cignox117-Sep-07 21:12
cignox117-Sep-07 21:12 
AnswerRe: adding controls to an invisible control Pin
Luc Pattyn17-Sep-07 23:03
sitebuilderLuc Pattyn17-Sep-07 23:03 
GeneralRe: adding controls to an invisible control Pin
cignox117-Sep-07 23:36
cignox117-Sep-07 23:36 
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 

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.