Click here to Skip to main content
15,899,124 members
Home / Discussions / Windows Forms
   

Windows Forms

 
AnswerRe: Get rid of WaitCursor Pin
Luc Pattyn2-Sep-11 5:39
sitebuilderLuc Pattyn2-Sep-11 5:39 
GeneralRe: Get rid of WaitCursor Pin
BillWoodruff2-Sep-11 19:08
professionalBillWoodruff2-Sep-11 19:08 
GeneralRe: Get rid of WaitCursor Pin
Luc Pattyn3-Sep-11 2:11
sitebuilderLuc Pattyn3-Sep-11 2:11 
GeneralRe: Get rid of WaitCursor Pin
GParkings3-Sep-11 12:20
GParkings3-Sep-11 12:20 
GeneralRe: Get rid of WaitCursor Pin
Eddy Vluggen3-Sep-11 13:15
professionalEddy Vluggen3-Sep-11 13:15 
GeneralRe: Get rid of WaitCursor Pin
Luc Pattyn3-Sep-11 13:36
sitebuilderLuc Pattyn3-Sep-11 13:36 
GeneralRe: Get rid of WaitCursor Pin
Eddy Vluggen3-Sep-11 22:43
professionalEddy Vluggen3-Sep-11 22:43 
GeneralRe: Get rid of WaitCursor Pin
BillWoodruff3-Sep-11 19:19
professionalBillWoodruff3-Sep-11 19:19 
Hi Luc,

Yes, I fully understand what you are doing in the class: I created it myself, out of curiousity, before you posted your example here, and tested it, with the significant exception that I changed a Control's (Button, whatever) Cursor to 'WaitCursor, I didn't change the Cursor on the entire Form.

Do you have any evidence whatsoever that changing the visual appearance of a Cursor on a Control or a Form is a cause of a memory leak, or consumes resources in a way that is not garbage collected ? And, that the solution you present here in any way prevents a memory leak ?

I repeat that there is no valid reason for use of such a technique for so simple a task as changing the visual appearance of a Cursor, and, for those not-common, and well-documented cases, where .NET tells us we should bracket certain objects in a 'Using {} block, the reasons are crystal clear.

This kind of over-engineering for simple tasks is what I refer to as "gratuitious elegance." And, if I were a beginner in .NET, I would find this truly confusing.

You wrote: "So there may be hundreds of using(new LP_WaitCursor(this)) statements in a single app, each one replacing a pair of Cursor=... statements."

My mind boggles trying to envision what type of application really uses "hundreds" of such classes, winking and blinking out of existence, each storing a reference to a Form.

If (please, don't let it happen) I ever saw an application with "hundreds" of uses of such a class, with all kinds of controls putting a 'WaitCursor' on an entire Form, I would promptly conclude that: there's an application where the fundamental design involving threading is ... to put it mildly ... 'off the planet.'

I can, indeed, imagine a scenario in which some tasks are so critical, their completion essential to so many pending-task-dependencies, that an entire application (or its UI) should "freeze up," or at least present some modal, ... even can't-be-cancelled ? ... dialog or progress bar, or whatever (nuclear power plant control ?), by the way.

disputatur in spiritu fratribus, Bill
"Is it a fact - or have I dreamt it - that, by means of electricity, the world of matter has become a great nerve, vibrating thousands of miles in a breathless point of time? Rather, the round globe is a vast head, a brain, instinct with intelligence!" - Nathanial Hawthorne, House of the Seven Gables

GeneralRe: Get rid of WaitCursor Pin
Luc Pattyn4-Sep-11 2:42
sitebuilderLuc Pattyn4-Sep-11 2:42 
GeneralRe: Get rid of WaitCursor Pin
BillWoodruff4-Sep-11 14:21
professionalBillWoodruff4-Sep-11 14:21 
GeneralRe: Get rid of WaitCursor Pin
Luc Pattyn4-Sep-11 14:42
sitebuilderLuc Pattyn4-Sep-11 14:42 
GeneralRe: Get rid of WaitCursor Pin
lukeer4-Sep-11 21:03
lukeer4-Sep-11 21:03 
AnswerRe: Get rid of WaitCursor Pin
Luc Pattyn5-Sep-11 1:29
sitebuilderLuc Pattyn5-Sep-11 1:29 
GeneralRe: Get rid of WaitCursor Pin
MicroVirus5-Sep-11 11:17
MicroVirus5-Sep-11 11:17 
QuestionDeploying Reports Pin
eddieangel30-Aug-11 6:40
eddieangel30-Aug-11 6:40 
AnswerRe: Deploying Reports Pin
army_man7165530-Aug-11 8:00
army_man7165530-Aug-11 8:00 
Questionwindows forms using active directory Pin
dcof24-Aug-11 5:50
dcof24-Aug-11 5:50 
AnswerRe: windows forms using active directory Pin
GenJerDan24-Aug-11 6:16
GenJerDan24-Aug-11 6:16 
GeneralRe: windows forms using active directory Pin
dcof24-Aug-11 11:42
dcof24-Aug-11 11:42 
GeneralRe: windows forms using active directory Pin
GenJerDan25-Aug-11 3:22
GenJerDan25-Aug-11 3:22 
QuestionHost a WPF form/application windows inside a Winform - how? Pin
devvvy16-Aug-11 15:30
devvvy16-Aug-11 15:30 
AnswerRe: Host a WPF form/application windows inside a Winform - how? Pin
Simon Bang Terkildsen20-Aug-11 15:14
Simon Bang Terkildsen20-Aug-11 15:14 
QuestionWindows7 hosts file is ignored Pin
Muammar©13-Aug-11 20:45
Muammar©13-Aug-11 20:45 
AnswerRe: Windows7 hosts file is ignored Pin
Eddy Vluggen13-Aug-11 22:24
professionalEddy Vluggen13-Aug-11 22:24 
AnswerRe: Windows7 hosts file is ignored Pin
DaveAuld13-Aug-11 22:44
professionalDaveAuld13-Aug-11 22:44 

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.