Click here to Skip to main content
15,900,816 members
Home / Discussions / C#
   

C#

 
QuestionControlling GUI via text file ? Pin
keramik23-Jul-07 21:53
keramik23-Jul-07 21:53 
AnswerRe: Controlling GUI via text file ? Pin
JoeSharp23-Jul-07 22:00
JoeSharp23-Jul-07 22:00 
AnswerRe: Controlling GUI via text file ? Pin
Brady Kelly23-Jul-07 22:08
Brady Kelly23-Jul-07 22:08 
QuestionReport problem with procedure Pin
merwa23-Jul-07 21:53
merwa23-Jul-07 21:53 
QuestionForm is not response Pin
tradakad23-Jul-07 21:28
tradakad23-Jul-07 21:28 
AnswerRe: Form is not response Pin
Christian Graus23-Jul-07 22:18
protectorChristian Graus23-Jul-07 22:18 
GeneralRe: Form is not response Pin
tradakad23-Jul-07 23:02
tradakad23-Jul-07 23:02 
GeneralRe: Form is not response Pin
Martin#23-Jul-07 23:20
Martin#23-Jul-07 23:20 
Hello,

tradakad wrote:
private void tmrProcess_Tick(object sender, EventArgs e)
{
Application.DoEvents();

if (iterationsCount <= 2)
{
if (pointCount <= 10)
{
lblLoadingText.Text += ".";
pointCount++;
tmrProcess.Enabled = true;
}
else
{
lblLoadingText.Text = "Loading";
iterationsCount++;
pointCount = 0;

}
}

}

You should call the DoEvents at the end of the code!

tradakad wrote:
private void frmLoading_Shown(object sender, EventArgs e)
{
Application.DoEvents();


tradakad wrote:
private void frmLoading_Load(object sender, EventArgs e)
{
Application.DoEvents();
}

I don't think that this is neccessary!

Apart from that, you are using the Forms.Timer which is running in the GUI Thread.
So the Timer is influenced from the action in you thread and might be throwing the Tick event not as expected (delayed)!

You could use a System.Threading or System.Timers Timer, which are running in an own thread.
Therefore you would have to invoke the Form if you want to change the Text, from the elapsed event for example!





All the best,

Martin

GeneralRe: Form is not response Pin
tradakad24-Jul-07 0:41
tradakad24-Jul-07 0:41 
GeneralRe: Form is not response Pin
Martin#24-Jul-07 0:56
Martin#24-Jul-07 0:56 
GeneralRe: Form is not response Pin
Martin#24-Jul-07 1:13
Martin#24-Jul-07 1:13 
GeneralRe: Form is not response Pin
tradakad24-Jul-07 1:38
tradakad24-Jul-07 1:38 
GeneralRe: Form is not response Pin
Martin#24-Jul-07 1:52
Martin#24-Jul-07 1:52 
GeneralRe: Form is not response Pin
tradakad24-Jul-07 2:08
tradakad24-Jul-07 2:08 
GeneralRe: Form is not response Pin
Martin#24-Jul-07 2:18
Martin#24-Jul-07 2:18 
GeneralRe: Form is not response Pin
tradakad24-Jul-07 2:26
tradakad24-Jul-07 2:26 
GeneralRe: Form is not response Pin
tradakad23-Jul-07 23:58
tradakad23-Jul-07 23:58 
Questiondatagrid update command Pin
srinivassam23-Jul-07 21:01
srinivassam23-Jul-07 21:01 
QuestionException has been thrown by the target of an invocation Pin
Darkness8423-Jul-07 20:23
Darkness8423-Jul-07 20:23 
AnswerRe: Exception has been thrown by the target of an invocation Pin
Darkness8423-Jul-07 20:35
Darkness8423-Jul-07 20:35 
GeneralRe: Exception has been thrown by the target of an invocation Pin
Darkness8423-Jul-07 21:29
Darkness8423-Jul-07 21:29 
GeneralRe: Exception has been thrown by the target of an invocation Pin
Amjath Rahman23-Jul-07 21:33
Amjath Rahman23-Jul-07 21:33 
GeneralRe: Exception has been thrown by the target of an invocation Pin
Amjath Rahman23-Jul-07 21:36
Amjath Rahman23-Jul-07 21:36 
GeneralRe: Exception has been thrown by the target of an invocation Pin
Luc Pattyn24-Jul-07 2:04
sitebuilderLuc Pattyn24-Jul-07 2:04 
QuestionVideo handling Pin
pavya_Cool23-Jul-07 20:10
pavya_Cool23-Jul-07 20:10 

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.