Click here to Skip to main content
15,904,934 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to lock folders Pin
CodeItWell17-Jan-07 11:05
CodeItWell17-Jan-07 11:05 
QuestionReprotviewersessions prblm Pin
mahi988517-Jan-07 2:06
mahi988517-Jan-07 2:06 
Questionhow to set number of columns in repeater control? Pin
babutkchn17-Jan-07 1:33
babutkchn17-Jan-07 1:33 
AnswerRe: how to set number of columns in repeater control? Pin
Vinay Dornala17-Jan-07 1:41
Vinay Dornala17-Jan-07 1:41 
GeneralRe: how to set number of columns in repeater control? Pin
babutkchn17-Jan-07 1:48
babutkchn17-Jan-07 1:48 
GeneralRe: how to set number of columns in repeater control? Pin
Elina Blank17-Jan-07 2:38
sitebuilderElina Blank17-Jan-07 2:38 
Questiondate problem Pin
Tamimi - Code17-Jan-07 1:16
Tamimi - Code17-Jan-07 1:16 
AnswerRe: date problem Pin
Colin Angus Mackay17-Jan-07 1:50
Colin Angus Mackay17-Jan-07 1:50 
GeneralRe: date problem Pin
Tamimi - Code17-Jan-07 2:20
Tamimi - Code17-Jan-07 2:20 
AnswerRe: date problem Pin
Guffa17-Jan-07 1:55
Guffa17-Jan-07 1:55 
GeneralRe: date problem Pin
Tamimi - Code17-Jan-07 2:21
Tamimi - Code17-Jan-07 2:21 
QuestionOpenPathDialog? Pin
livez17-Jan-07 1:14
livez17-Jan-07 1:14 
AnswerRe: OpenPathDialog? Pin
JoeSharp17-Jan-07 1:22
JoeSharp17-Jan-07 1:22 
GeneralRe: OpenPathDialog? Pin
livez17-Jan-07 1:30
livez17-Jan-07 1:30 
Questionhow to drag and drop a label in a panel? Pin
greyzz17-Jan-07 1:06
greyzz17-Jan-07 1:06 
AnswerRe: how to drag and drop a label in a panel? Pin
Vinay Dornala17-Jan-07 1:36
Vinay Dornala17-Jan-07 1:36 
QuestionWriting message in eventlog Pin
ParagGupta16-Jan-07 23:52
ParagGupta16-Jan-07 23:52 
Questionhow to store data from c# into sql server data base Pin
rao raja16-Jan-07 23:29
rao raja16-Jan-07 23:29 
AnswerRe: how to store data from c# into sql server data base Pin
Colin Angus Mackay17-Jan-07 0:01
Colin Angus Mackay17-Jan-07 0:01 
AnswerRe: how to store data from c# into sql server data base Pin
Vinay Dornala17-Jan-07 0:08
Vinay Dornala17-Jan-07 0:08 
GeneralRe: how to store data from c# into sql server data base Pin
Colin Angus Mackay17-Jan-07 0:29
Colin Angus Mackay17-Jan-07 0:29 
GeneralRe: how to store data from c# into sql server data base Pin
Vinay Dornala17-Jan-07 1:29
Vinay Dornala17-Jan-07 1:29 
GeneralRe: how to store data from c# into sql server data base Pin
Colin Angus Mackay17-Jan-07 1:47
Colin Angus Mackay17-Jan-07 1:47 
QuestionC# WinForms: How to refresh an MdiChild.Icon when MdiChild is maximized Pin
H. Neville III16-Jan-07 23:02
H. Neville III16-Jan-07 23:02 
Hi

I wonder if anyone can help with this one, I've tried casting round on the net but couldn't find a solution.

I'm working on an MDI winforms app which contacts a web service to retrieve data. I use the MdiChild form Icon, linked to a Timer, to mimic am animated gif whilst the app is away fetching data - giving the app users a sense that something is happening:

<br />
private void TimerIconWorking_Tick(object sender, System.EventArgs e)<br />
{<br />
	if (this.Icon.Equals(this._IconWorking)) <br />
		this.Icon = this._IconWorking90;<br />
	else if (this.Icon.Equals(this._IconWorking90)) <br />
		this.Icon = this._IconWorking180;<br />
	else if (this.Icon.Equals(this._IconWorking180)) <br />
		this.Icon = this._IconWorking270;<br />
	else if (this.Icon.Equals(this._IconWorking270)) <br />
		this.Icon = this._IconWorking;<br />
	else	// disable the timer as we're not in "working" mode any longer...<br />
		TimerIconWorking.Enabled = false;<br />
}<br />


This works prefectly well while the MdiChild WindowState is Normal, however, once I maximize the form the MdiChild Icon does not get redrawn via the timer event. [Note this is the MdiChild (form level) Icon, not the MdiParent (application level) Icon.] The event fires fine, the code above gets executed as expected, but the Icon is not refreshed - except when I click off the app while the timer event is executing; then the redraw happens... (I think this is a clue but I'm not sure how to interpret it!)

I've tried to force the app to refresh by adding something like this to the event above but to no avail:
<br />
if ((this.WindowState == FormWindowState.Maximized)&&(this.MdiParent != null))<br />
{<br />
	//None of these have the desired effect...<br />
	//this.Invalidate(true);<br />
	//MdiParent.Invalidate(true);<br />
	//this.Refresh();<br />
	//MdiParent.Refresh();				<br />
}<br />


1) Is there any obvious way to force a refresh the MdiChild form Icon whilst the form is maximized?
2) If the MdiParent.Menu area (where the MdiChild.Icon resides when the MdiChild is maximized) is rendered by Windows, rather than by the MdiParent, is there any way to force Windows to render this area of the MdiParent?

Cheers

HN3
AnswerRe: C# WinForms: How to refresh an MdiChild.Icon when MdiChild is maximized Pin
il_masacratore17-Jan-07 3:21
il_masacratore17-Jan-07 3:21 

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.