473,324 Members | 2,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

windows form not responding

Expand|Select|Wrap|Line Numbers
  1.   string scrolltext = "Note -: This survey has been designed to determine your level of satisfaction with Administration Affairs Dept services. Your participation in this survey is important as it helps us to identify any areas of concern with our services and helps us to continuously review and improve the services we bring to u!!!!!!!!";
  2.  
  3.             //string Lyrics = "This song is just six words long";
  4.             int CurrentPosition = 0;
  5.             const int CharactersToShow = 100;
  6.  
  7.               for (int i = 0; i < scrolltext.Length; i++)
  8.             {
  9.                 label2.Text = CharactersToShow + CurrentPosition > scrolltext.Length
  10.                             ? scrolltext.Substring(CurrentPosition)
  11.                             : scrolltext.Substring(CurrentPosition, CharactersToShow);
  12.                 CurrentPosition++;
  13.                 label2.Update();
  14.                thread.sleep(250);
  15.             }
for the above loop i am using thread . that scrooling is fine but i cant able tou use other function like in the form textboxes are ther when i am clicking the textbox the form is geting stuck the reason showing is not responding . i am not getting why it is happining can any body suggest me where m wrong
Jul 7 '13 #1
2 1865
beacon
579 512MB
Is that all of your code? Have you debugged your code to see what lines of code processed prior to the form entering the 'Not Responding' state?

I'm no expert, but you may be having trouble because either (1.) your thread isn't allowing for enough time in relation to the progress you're trying to update on the label or (2.) the progress/update isn't actually being performed in a separate thread.

Like I said, I'm not expert and my responses are guesses based on my own very limited personal experience. I ran into something similar in a recent project and I ended up using the BackgroundWorker instead...I think, based on what I read at the time, that it's considered by most people to be the preferred method when threading (depending, of course, on your version of .NET, which you didn't specify).
Jul 9 '13 #2
firstly thanks beacon...may be your guess will bi right .. ill go through that one but for rite now i am using timer instead of thread...
Jul 10 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Hamed | last post by:
Hello I have employed as a developer in a software company that its team uses FoxPro / VB 6.0 / VC++ 6.0 as the developing tools and newly is going to migrate to VS.NET. There is a project...
5
by: Xarky | last post by:
Hi, I am creating a windows form, and when a specified event occurs (button click), I am hiding the windows form and opening a new windows form. When opening the new windows form and closing...
5
by: Dave | last post by:
How do I check in a Windows Forms app if any controls have changed? I have a form that collects data, and I want to prompt the user if they try to exit the app, or load a new file, without saving...
9
by: Rajat Tandon | last post by:
Hello there, I am relatively new to the newsgroups and C#. I have never been disappointed with the groups and always got the prompt replies to my queries.This is yet another strange issue, I am...
4
by: Michael C# | last post by:
I have a Windows Form I want to add to another form similar to the way you add an OpenFileDialog to a Windows Form from the Toolbox. Thx
8
by: Alison | last post by:
Hi, Al I am trying to design a user interface which provides both menus and toolbars for some users to click on whatever they want to do, at the same time, I would like to have a console window...
2
by: Belee | last post by:
When I want to create a windows form in VB.NET it will not create. But if I create an inherited form it is created. What is wrong? I need help!!!!
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
9
by: mohit.akl | last post by:
Hey guys & gals I am havng trouble modifying the control box. I want to make the maximise button invisible and have minimisise button instead of it. Like this _ X (not like _ o X ) How...
7
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.