Click here to Skip to main content
15,885,767 members
Home / Discussions / C#
   

C#

 
Generalextend an array like int[] Pin
yyf8-Oct-03 8:16
yyf8-Oct-03 8:16 
GeneralRe: extend an array like int[] Pin
Daniel M. Edwards8-Oct-03 8:48
Daniel M. Edwards8-Oct-03 8:48 
GeneralRe: extend an array like int[] Pin
jparsons8-Oct-03 12:09
jparsons8-Oct-03 12:09 
GeneralI'm C# newbie, how do I add a website to my application using Microsft Web Browser control? Please tell me step by step Pin
CSharp13148-Oct-03 7:54
CSharp13148-Oct-03 7:54 
GeneralRe: I'm C# newbie, how do I add a website to my application using Microsft Web Browser control? Please tell me step by step Pin
JJF0078-Oct-03 10:32
JJF0078-Oct-03 10:32 
GeneralRe: I'm C# newbie, how do I add a website to my application using Microsft Web Browser control? Please tell me step by step Pin
CSharp13148-Oct-03 17:51
CSharp13148-Oct-03 17:51 
GeneralRe: I'm C# newbie, how do I add a website to my application using Microsft Web Browser control? Please tell me step by step Pin
Daniel M. Edwards8-Oct-03 18:25
Daniel M. Edwards8-Oct-03 18:25 
GeneralHelp, can not lock a TextBoxBase Pin
yyf8-Oct-03 7:48
yyf8-Oct-03 7:48 
<br />
	public class LogClass <br />
	{<br />
		private TextBoxBase outputWin = null;<br />
<br />
		public LogClass(TextBoxBase win)<br />
		{<br />
			outputWin = win;<br />
		}<br />
<br />
		public void ShowMessage(string message)<br />
		{<br />
			string s = System.DateTime.Now.ToString() + ": " + message + "\r\n";<br />
			lock ( this ) <br />
			{<br />
				// show the log message to output window<br />
				if ( outputWin != null ) <br />
				{<br />
					if ( s.Length + outputWin.TextLength > outputWin.MaxLength ) <br />
					{<br />
						outputWin.Text = "";<br />
					}<br />
					outputWin.Text += s;<br />
				}<br />
                          }<br />
}<br />
}<br />
<br />
<br />
public MyClass<br />
{<br />
		private System.Windows.Forms.TextBox logBox;<br />
<br />
private void DoSomething()<br />
{<br />
	log.ShowMessage("thread running" );<br />
}<br />
<br />
		private void button3_Click(object sender, System.EventArgs e)<br />
		{<br />
				log.ShowMessage( "start test" );<br />
				Thread[] t = new Thread[10];<br />
				int i = 0;<br />
				for ( i = 0; i < 10; i ++ )<br />
				{<br />
					t[i] = new Thread(new ThreadStart(this.DoSomething));<br />
					t[i].Start();<br />
					Thread.Sleep(100);<br />
				}<br />
<br />
				log.ShowMessage( "end test" );<br />
			}<br />
		}<br />
<br />
		public MyClass()<br />
		{<br />
			log = new LogClass( logBox);<br />
                }<br />
<br />
}


My code gets stuck at the LogClass.ShowMessage(). Anybody knows why?

Thanks in advance!
GeneralGet Logical Drives and Contens from a Server Pin
eristoffx8-Oct-03 5:01
eristoffx8-Oct-03 5:01 
GeneralRe: Get Logical Drives and Contens from a Server Pin
Blake Coverett8-Oct-03 16:15
Blake Coverett8-Oct-03 16:15 
GeneralIntellisence custom object Pin
Anonymous8-Oct-03 4:53
Anonymous8-Oct-03 4:53 
GeneralRe: Intellisence custom object Pin
Judah Gabriel Himango8-Oct-03 10:57
sponsorJudah Gabriel Himango8-Oct-03 10:57 
GeneralListview and Icon / Image Pin
JJF0078-Oct-03 4:40
JJF0078-Oct-03 4:40 
GeneralRe: Listview and Icon / Image Pin
Heath Stewart8-Oct-03 10:27
protectorHeath Stewart8-Oct-03 10:27 
GeneralExcel Charts in own Application Pin
SörenH8-Oct-03 1:41
SörenH8-Oct-03 1:41 
GeneralRe: Excel Charts in own Application Pin
Stephane Rodriguez.8-Oct-03 11:14
Stephane Rodriguez.8-Oct-03 11:14 
GeneralRe: Excel Charts in own Application Pin
J. Dunlap8-Oct-03 11:38
J. Dunlap8-Oct-03 11:38 
GeneralRe: Excel Charts in own Application Pin
Stephane Rodriguez.8-Oct-03 11:51
Stephane Rodriguez.8-Oct-03 11:51 
GeneralRe: Excel Charts in own Application Pin
SörenH8-Oct-03 19:55
SörenH8-Oct-03 19:55 
GeneralRecognizing Clickposition in Circle Pin
O c t a v i e8-Oct-03 1:33
O c t a v i e8-Oct-03 1:33 
GeneralRe: Recognizing Clickposition in Circle Pin
O c t a v i e8-Oct-03 1:35
O c t a v i e8-Oct-03 1:35 
GeneralRe: Recognizing Clickposition in Circle Pin
Blake Coverett8-Oct-03 21:52
Blake Coverett8-Oct-03 21:52 
GeneralRe: Recognizing Clickposition in Circle Pin
O c t a v i e8-Oct-03 22:01
O c t a v i e8-Oct-03 22:01 
GeneralRe: Recognizing Clickposition in Circle Pin
Philip Fitzsimons8-Oct-03 2:38
Philip Fitzsimons8-Oct-03 2:38 
GeneralRemoting, proxy question Pin
Hans Ruck8-Oct-03 0:52
Hans Ruck8-Oct-03 0:52 

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.