Click here to Skip to main content
15,906,463 members
Home / Discussions / C#
   

C#

 
GeneralSetupDiGetDeviceInterfaceDetail driving me mad! Pin
Pain_Elemental1-Jul-04 10:22
Pain_Elemental1-Jul-04 10:22 
GeneralRe: SetupDiGetDeviceInterfaceDetail driving me mad! Pin
leppie1-Jul-04 12:17
leppie1-Jul-04 12:17 
GeneralRe: SetupDiGetDeviceInterfaceDetail driving me mad! Pin
Pain_Elemental1-Jul-04 19:46
Pain_Elemental1-Jul-04 19:46 
GeneralRe: SetupDiGetDeviceInterfaceDetail driving me mad! Pin
Pain_Elemental3-Jul-04 21:49
Pain_Elemental3-Jul-04 21:49 
GeneralA question about object sender Pin
Member 9401251-Jul-04 9:01
Member 9401251-Jul-04 9:01 
GeneralRe: A question about object sender Pin
Karl 20001-Jul-04 10:12
Karl 20001-Jul-04 10:12 
GeneralRe: A question about object sender Pin
Member 9401251-Jul-04 10:34
Member 9401251-Jul-04 10:34 
GeneralCalling UI Thread Pin
WKIII1-Jul-04 8:59
WKIII1-Jul-04 8:59 
Ok guys, I've done my research and I have found great articles here that really gave me a kickstart on updating the UI by calling Invoke on the main thread from a worker thread. But I'm trying to apply this knowledge to an application which uses delegates to perform asynchronous calls without sucess. Here is the interesting situation:
I have a delegate declared outside the windows form class resposible for the UI updates
public delegate void delegateUpdateStatus(string msg);
then there is the delegate which I use for the asynchronous calls (inside the form class)
public delegate void delegateAsynch(parameters here);
in the click event of a button I create an instance of the asynchronous delegate
delegateAsynch myAsynchDelegate = new delegateAsynch(target function)
then I use the BeginInvoke method on the asynchronous delegate and works perfectly great. Now I have decided to update the UI with a label giving feedback of the progress. That's where the first delegate declared above comes in. The problem is that in the target function I make a call to Invoke like:
Invoke(new delegateUpdateStatus(updateStatus), new object[] {"Hello"});
or BeginInvoke(new delegateUpdateStatus(updateStatus), new object[] {"Hello"});
and the application goes to a zombie state with any of those statements without even modifying the UI (I tried only one of those statements on different runs). I have carefully placed breakpoints to see where it is hanging but after any of those lines is executed no other instruction is called, not even the method (updateStatus) the delegate is supposed to call. It is worth noting that Intellisense really knows that Invoke or BeginInvoke comes from Control. I have slapped against a wall, please help!
GeneralRe: Calling UI Thread Pin
Heath Stewart2-Jul-04 2:37
protectorHeath Stewart2-Jul-04 2:37 
GeneralRe: Calling UI Thread Pin
WKIII6-Jul-04 10:18
WKIII6-Jul-04 10:18 
GeneralSenior C# Programmer Pin
MikeHarris1-Jul-04 8:55
MikeHarris1-Jul-04 8:55 
GeneralRe: Senior C# Programmer Pin
Colin Angus Mackay1-Jul-04 12:26
Colin Angus Mackay1-Jul-04 12:26 
GeneralSetting application icon doesnt work Pin
Anonymous1-Jul-04 8:12
Anonymous1-Jul-04 8:12 
GeneralRe: Setting application icon doesnt work Pin
Karl 20001-Jul-04 10:20
Karl 20001-Jul-04 10:20 
GeneralRe: Setting application icon doesnt work Pin
leppie1-Jul-04 12:22
leppie1-Jul-04 12:22 
GeneralRe: Setting application icon doesnt work Pin
Anonymous2-Jul-04 1:16
Anonymous2-Jul-04 1:16 
General.Net Remoting return Object help Pin
bmasephol1-Jul-04 7:19
bmasephol1-Jul-04 7:19 
GeneralRe: .Net Remoting return Object help Pin
Judah Gabriel Himango1-Jul-04 7:57
sponsorJudah Gabriel Himango1-Jul-04 7:57 
GeneralRe: .Net Remoting return Object help Pin
Judah Gabriel Himango1-Jul-04 8:04
sponsorJudah Gabriel Himango1-Jul-04 8:04 
GeneralRe: .Net Remoting return Object help Pin
bmasephol1-Jul-04 8:46
bmasephol1-Jul-04 8:46 
GeneralRe: .Net Remoting return Object help Pin
WKIII1-Jul-04 8:08
WKIII1-Jul-04 8:08 
GeneralRe: .Net Remoting return Object help Pin
Tom Larsen1-Jul-04 19:19
Tom Larsen1-Jul-04 19:19 
GeneralRe: .Net Remoting return Object help Pin
bmasephol2-Jul-04 3:06
bmasephol2-Jul-04 3:06 
GeneralWhy Add and Remove button of propertyGrid disabled Pin
god4k1-Jul-04 6:48
god4k1-Jul-04 6:48 
GeneralRe: Why Add and Remove button of propertyGrid disabled Pin
Heath Stewart2-Jul-04 2:29
protectorHeath Stewart2-Jul-04 2:29 

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.