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

C#

 
GeneralRe: fast way to find the first letter in a richTextBox? Pin
ektoras8-Feb-05 23:10
ektoras8-Feb-05 23:10 
GeneralSizing toolbar buttons Pin
Luis Alonso Ramos8-Feb-05 12:17
Luis Alonso Ramos8-Feb-05 12:17 
GeneralRe: Sizing toolbar buttons Pin
Christian Graus8-Feb-05 12:26
protectorChristian Graus8-Feb-05 12:26 
GeneralRe: Sizing toolbar buttons Pin
Luis Alonso Ramos8-Feb-05 14:45
Luis Alonso Ramos8-Feb-05 14:45 
QuestionCould you make it faster? Pin
ektoras8-Feb-05 11:10
ektoras8-Feb-05 11:10 
AnswerRe: Could you make it faster? Pin
Judah Gabriel Himango8-Feb-05 11:42
sponsorJudah Gabriel Himango8-Feb-05 11:42 
AnswerRe: Could you make it faster? Pin
Christian Graus8-Feb-05 12:03
protectorChristian Graus8-Feb-05 12:03 
GeneralRe: Could you make it faster? Pin
ektoras8-Feb-05 12:19
ektoras8-Feb-05 12:19 
I want to make blue color all words
int position=0;<br />
		char[] KeywordsCanStartWith  = {'_','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q',<br />
										   'r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I',<br />
										   'J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'} ;<br />
		char[] KeywordsEndBeforeApears = {' ','\t','(',')',',','.',';','\n','[',']','{','}','+','-','*','/',':',<br />
											 '=','<','>','|','\\','&','%','?','$','!','"','#','\'','@','^'} ;<br />
		bool LogVar;<br />
		//give blue color to all keywords(=words)<br />
		void giveColorToKeywordsInRTB(object sender, System.EventArgs e)<br />
		{<br />
			position=0;<br />
			KeywordStartsHere=-1; caretPos=richTextBox1.SelectionStart;	<br />
			LogVar=true;<br />
			LockWindowUpdate(richTextBox1.Handle);<br />
			richTextBox1.Select(0, richTextBox1.Text.Length);<br />
			richTextBox1.SelectionColor = Color.Black ;<br />
			while(LogVar)<br />
			{<br />
				KeywordStartsHere = richTextBox1.Text.IndexOfAny(KeywordsCanStartWith , position);<br />
				if(position<0)<br />
					break ;				<br />
				if(position==KeywordStartsHere)<br />
				{<br />
					position = richTextBox1.Text.IndexOfAny(KeywordsEndBeforeApears, position) ;<br />
					if(position==-1)<br />
						position=richTextBox1.Text.Length-1 ;<br />
					else<br />
						position--;<br />
					richTextBox1.Select(KeywordStartsHere, position-KeywordStartsHere+1);<br />
					richTextBox1.SelectionColor = Color.Blue ;<br />
				}<br />
			}<br />
				if(++position > richTextBox1.Text.Length-1)<br />
					LogVar=false;<br />
			}<br />
		}

GeneralRe: Could you make it faster? Pin
ektoras8-Feb-05 12:38
ektoras8-Feb-05 12:38 
GeneralRe: Could you make it faster? Pin
Christian Graus8-Feb-05 12:43
protectorChristian Graus8-Feb-05 12:43 
GeneralRe: Could you make it faster? Pin
leppie8-Feb-05 22:17
leppie8-Feb-05 22:17 
GeneralRe: Could you make it faster? Pin
ektoras8-Feb-05 23:00
ektoras8-Feb-05 23:00 
GeneralRe: Could you make it faster? Pin
leppie8-Feb-05 23:23
leppie8-Feb-05 23:23 
Generaldate format Pin
aviramre8-Feb-05 9:33
aviramre8-Feb-05 9:33 
GeneralRe: date format Pin
Luis Alonso Ramos8-Feb-05 12:20
Luis Alonso Ramos8-Feb-05 12:20 
GeneralUserControls Pin
PaleyX8-Feb-05 9:25
PaleyX8-Feb-05 9:25 
QuestionHow to trap/change/disable timeout in invoke method of SoapHttpClientProtocol? Pin
CherezZaboro8-Feb-05 9:08
CherezZaboro8-Feb-05 9:08 
GeneralAttributes Pin
Yaakov Davis8-Feb-05 7:46
Yaakov Davis8-Feb-05 7:46 
GeneralRe: Attributes Pin
leppie8-Feb-05 9:57
leppie8-Feb-05 9:57 
GeneralGet visible rectangle of the form ... Pin
Meneldor8-Feb-05 6:11
Meneldor8-Feb-05 6:11 
GeneralViewState in Business Component Pin
Mr_Yash8-Feb-05 6:08
Mr_Yash8-Feb-05 6:08 
GeneralVideo card/screen resolution question... Pin
new_phoenix8-Feb-05 5:16
new_phoenix8-Feb-05 5:16 
GeneralRe: Video card/screen resolution question... Pin
Dave Kreskowiak8-Feb-05 6:26
mveDave Kreskowiak8-Feb-05 6:26 
GeneralRe: Video card/screen resolution question... Pin
new_phoenix8-Feb-05 7:47
new_phoenix8-Feb-05 7:47 
GeneralRe: Video card/screen resolution question... Pin
Dave Kreskowiak8-Feb-05 7:54
mveDave Kreskowiak8-Feb-05 7:54 

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.