Click here to Skip to main content
15,903,201 members
Home / Discussions / C#
   

C#

 
QuestionRunning parallely single Application with two differnt versions Pin
kumar.bs14-Jun-06 5:59
kumar.bs14-Jun-06 5:59 
AnswerRe: Running parallely single Application with two differnt versions Pin
Mr. VB.NET14-Jun-06 6:10
Mr. VB.NET14-Jun-06 6:10 
GeneralRe: Running parallely single Application with two differnt versions Pin
kumar.bs14-Jun-06 6:17
kumar.bs14-Jun-06 6:17 
GeneralRe: Running parallely single Application with two differnt versions Pin
Mr. VB.NET14-Jun-06 6:21
Mr. VB.NET14-Jun-06 6:21 
GeneralRe: Running parallely single Application with two differnt versions Pin
Tim Paaschen14-Jun-06 20:44
Tim Paaschen14-Jun-06 20:44 
AnswerRe: Running parallely single Application with two differnt versions Pin
leppie14-Jun-06 6:57
leppie14-Jun-06 6:57 
QuestionPaint Method C# Pin
reshsilk14-Jun-06 5:47
reshsilk14-Jun-06 5:47 
AnswerRe: Paint Method C# Pin
Alexander Wiseman14-Jun-06 6:43
Alexander Wiseman14-Jun-06 6:43 
RC,

To force the Windows Form to redraw, you should use the Invalidate function, rather than calling the paint event handler directly. For information on that function, have a look at Control.Invalidate[^] from MSDN.

The important thing to note about the Invalidate function in that article is this sentence:

"Calling the Invalidate method does not force a synchronous paint; to force a synchronous paint, call the Update method after calling the Invalidate method. When this method is called with no parameters, the entire client area is added to the update region."

This simply means that when the Invalidate function returns, the control has not necessarily been redrawn yet. Thus it is possible that, after the user has clicked your "Go" button, the form does not redraw itself (although in normal usage, you won't really be able to tell). Nevertheless, as the MSDN documentation says, to force the redraw immediately, simply call the Update function after you call Invalidate.

Here is how your code would look:
private void goBtn_Click(object sender, EventArgs e)
{
     pltNum = pltList.SelectedIndex;
     this.Invalidate();
     this.Update()
}
Let me know if that works for you, or if you still have a difficulty, I will try to help you as best I can.

Sincerely,
Alexander Wiseman

GeneralRe: Paint Method C# Pin
reshsilk15-Jun-06 4:48
reshsilk15-Jun-06 4:48 
QuestionC# Design Patterns (Abstraction etc.) Pin
Mr. VB.NET14-Jun-06 5:38
Mr. VB.NET14-Jun-06 5:38 
AnswerRe: C# Design Patterns (Abstraction etc.) Pin
Kevin McFarlane14-Jun-06 5:51
Kevin McFarlane14-Jun-06 5:51 
GeneralRe: C# Design Patterns (Abstraction etc.) Pin
Mr. VB.NET14-Jun-06 6:08
Mr. VB.NET14-Jun-06 6:08 
GeneralRe: C# Design Patterns (Abstraction etc.) [modified] Pin
Josh Smith14-Jun-06 7:15
Josh Smith14-Jun-06 7:15 
GeneralRe: C# Design Patterns (Abstraction etc.) Pin
Mr. VB.NET14-Jun-06 10:56
Mr. VB.NET14-Jun-06 10:56 
GeneralRe: C# Design Patterns (Abstraction etc.) Pin
Kevin McFarlane14-Jun-06 23:19
Kevin McFarlane14-Jun-06 23:19 
AnswerRe: C# Design Patterns (Abstraction etc.) Pin
Kevin McFarlane14-Jun-06 6:02
Kevin McFarlane14-Jun-06 6:02 
QuestionInstaller Language settings [modified] Pin
Endren14-Jun-06 5:20
Endren14-Jun-06 5:20 
QuestionEvents, Threads & BindingSource Pin
iswoolley14-Jun-06 5:14
iswoolley14-Jun-06 5:14 
AnswerRe: Events, Threads & BindingSource Pin
Mr. VB.NET14-Jun-06 5:34
Mr. VB.NET14-Jun-06 5:34 
GeneralRe: Events, Threads & BindingSource Pin
iswoolley14-Jun-06 6:59
iswoolley14-Jun-06 6:59 
AnswerRe: Events, Threads & BindingSource Pin
Mr. VB.NET14-Jun-06 6:32
Mr. VB.NET14-Jun-06 6:32 
AnswerRe: Events, Threads & BindingSource Pin
Leslie Sanford14-Jun-06 10:20
Leslie Sanford14-Jun-06 10:20 
AnswerRe: Events, Threads & BindingSource Pin
iswoolley19-Jun-06 5:45
iswoolley19-Jun-06 5:45 
Questionwhich datatype will be appropriate for Ratio calculation in C# Pin
kumar.bs14-Jun-06 5:12
kumar.bs14-Jun-06 5:12 
AnswerRe: which datatype will be appropriate for Ratio calculation in C# Pin
User 665814-Jun-06 5:20
User 665814-Jun-06 5:20 

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.