Click here to Skip to main content
15,887,380 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: C# WinForms: How to refresh an MdiChild.Icon when MdiChild is maximized Pin
H. Neville III21-Jan-07 22:13
H. Neville III21-Jan-07 22:13 
QuestionCrystalreport &dataset Pin
md_refay16-Jan-07 22:59
md_refay16-Jan-07 22:59 
AnswerRe: Crystalreport &dataset Pin
Blue_Boy17-Jan-07 0:18
Blue_Boy17-Jan-07 0:18 
AnswerRe: Crystalreport &dataset Pin
Vinay Dornala17-Jan-07 0:29
Vinay Dornala17-Jan-07 0:29 
Questionretrieve text from a currently selected cell of a datagrid Pin
Saira Tanwir16-Jan-07 22:55
Saira Tanwir16-Jan-07 22:55 
AnswerRe: retrieve text from a currently selected cell of a datagrid Pin
Seishin#16-Jan-07 22:59
Seishin#16-Jan-07 22:59 
GeneralRe: retrieve text from a currently selected cell of a datagrid Pin
Saira Tanwir16-Jan-07 23:04
Saira Tanwir16-Jan-07 23:04 
AnswerRe: Remote Computer Pin
JacquesDP17-Jan-07 0:18
JacquesDP17-Jan-07 0:18 
QuestionHow to Get Current Row Value on DataGirdView Pin
dataminers16-Jan-07 22:20
dataminers16-Jan-07 22:20 
AnswerRe: How to Get Current Row Value on DataGirdView Pin
Seishin#16-Jan-07 22:22
Seishin#16-Jan-07 22:22 
GeneralRe: How to Get Current Row Value on DataGirdView Pin
dataminers16-Jan-07 22:38
dataminers16-Jan-07 22:38 
Questionhow to use SendMassege Pin
freespeed16-Jan-07 21:01
freespeed16-Jan-07 21:01 
AnswerRe: how to use SendMassege Pin
Luc Pattyn17-Jan-07 0:43
sitebuilderLuc Pattyn17-Jan-07 0:43 
AnswerRe: how to use SendMassege Pin
Luc Pattyn17-Jan-07 1:21
sitebuilderLuc Pattyn17-Jan-07 1:21 
QuestionVSS Database Create directory. Pin
Elephant12316-Jan-07 20:46
Elephant12316-Jan-07 20:46 
AnswerRe: VSS Database Create directory. Pin
ednrgc17-Jan-07 4:45
ednrgc17-Jan-07 4:45 

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.