Click here to Skip to main content
16,004,854 members
Home / Discussions / C#
   

C#

 
GeneralRe: Terminating threads Pin
S. Senthil Kumar13-Feb-05 13:09
S. Senthil Kumar13-Feb-05 13:09 
GeneralRe: Terminating threads Pin
eggie513-Feb-05 16:32
eggie513-Feb-05 16:32 
GeneralRe: Terminating threads Pin
S. Senthil Kumar13-Feb-05 18:05
S. Senthil Kumar13-Feb-05 18:05 
GeneralRe: Terminating threads Pin
eggie513-Feb-05 18:22
eggie513-Feb-05 18:22 
GeneralRe: Terminating threads Pin
Wizard_0113-Feb-05 20:41
Wizard_0113-Feb-05 20:41 
GeneralMemory usage Pin
PaleyX13-Feb-05 7:38
PaleyX13-Feb-05 7:38 
GeneralRe: Memory usage Pin
Judah Gabriel Himango13-Feb-05 8:51
sponsorJudah Gabriel Himango13-Feb-05 8:51 
GeneralProblem with webbrowser in C# Pin
Jucs13-Feb-05 7:38
Jucs13-Feb-05 7:38 
Hi you all Smile | :)

I am programming a little chat-program. In order to work with the source code of the chat-text I try to get into a string - the action causes my program to get very slow the mous comes over the webbrowser. Here's the code:

private void docucTimer_Tick(object sender, EventArgs e)
{
DocumentText = chatBox1.DocumentText;
if(curText.Length != DocumentText.Length)
{
docText = DocumentText;
try
{
docText = docText.Substring(curText.Length);
}
catch
{
}
curText = DocumentText;
chatBox1_OnDocumentTextChanged();
}
}

The first line, DocumentText = chatBox1.DocumentText;, is the problem.

If the mouse comes over the webbrowser in the program, my CPU-Usage goes up to a 100 %. This happens after at about 5 minutes of program-runtime.
If I disable the code shown upper from the beginning on, the problem does not appear, but - and thats really strange - if I disable the code after I first recognized the problem it will still exist and there's no way to get the old state excerpt of restarting the software...

Is there a way to solve the problem?

I am a noob, I am sorry for that - and also for my not-being-able to speak English :P

And thank you for your help!
GeneralRe: Problem with webbrowser in C# Pin
Judah Gabriel Himango13-Feb-05 8:55
sponsorJudah Gabriel Himango13-Feb-05 8:55 
GeneralRe: Problem with webbrowser in C# Pin
Jucs13-Feb-05 10:07
Jucs13-Feb-05 10:07 
GeneralGetting the volume names of disks Pin
Marlun13-Feb-05 6:16
Marlun13-Feb-05 6:16 
GeneralRe: Getting the volume names of disks Pin
Heath Stewart13-Feb-05 6:56
protectorHeath Stewart13-Feb-05 6:56 
GeneralRe: Getting the volume names of disks Pin
Marlun13-Feb-05 8:08
Marlun13-Feb-05 8:08 
GeneralRe: Getting the volume names of disks Pin
Marlun13-Feb-05 8:16
Marlun13-Feb-05 8:16 
GeneralRe: Getting the volume names of disks Pin
Heath Stewart13-Feb-05 21:38
protectorHeath Stewart13-Feb-05 21:38 
GeneralRe: Getting the volume names of disks Pin
Marlun14-Feb-05 1:29
Marlun14-Feb-05 1:29 
GeneralRe: Getting the volume names of disks Pin
Heath Stewart14-Feb-05 7:59
protectorHeath Stewart14-Feb-05 7:59 
GeneralRe: Getting the volume names of disks Pin
Marlun14-Feb-05 18:56
Marlun14-Feb-05 18:56 
GeneralRe: Getting the volume names of disks Pin
Heath Stewart15-Feb-05 5:52
protectorHeath Stewart15-Feb-05 5:52 
GeneralSave and Get image data from database Pin
Sasuko13-Feb-05 5:41
Sasuko13-Feb-05 5:41 
GeneralRe: Save and Get image data from database Pin
Heath Stewart13-Feb-05 7:16
protectorHeath Stewart13-Feb-05 7:16 
GeneralRe: Save and Get image data from database Pin
Sasuko13-Feb-05 11:27
Sasuko13-Feb-05 11:27 
Generalwhidbey - where is Global.asax codebehind file Pin
abcxyz8213-Feb-05 2:35
abcxyz8213-Feb-05 2:35 
GeneralRe: whidbey - where is Global.asax codebehind file Pin
Heath Stewart13-Feb-05 7:15
protectorHeath Stewart13-Feb-05 7:15 
GeneralRe: whidbey - where is Global.asax codebehind file Pin
abcxyz8214-Feb-05 3:28
abcxyz8214-Feb-05 3:28 

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.