|
How would you suggest that a status indicator control should be implemented when the thread whose status is being monitored is separate from the thread that owns the form where the control appears? I have a control which is perfectly happy with having its underlying data changed asynchronously (that's all thread-safe), but I need some way to request that the control be updated when that occurs. I don't see any reason the .Net framework couldn't have provided an asynchronous .Refresh method (which would return immediately, but cause the control to be refreshed when convenient), but I'm not aware of any such feature.
|
|
|
|
|
supercat9 wrote: How would you suggest that a status indicator control should be implemented
Ever hear of the Observer Pattern[^]?
led mike
|
|
|
|
|
I'm not quite clear how the Observer Pattern would solve the problem. The Subject is running on a different thread from the control that's acting as Observer. Between the time the Subject decides to "Invoke" the control and the time the Invoke actually happens, the Observer could notify the Subject that it's going away, but there would be no way for the Subject to act upon that information before the Invoke occurs.
(IDEA): Perhaps a dummy object could be created which is bound to the same thread, and the invocation passed through that? Since the code invoked on that control would be running on the only thread that could dispose the control, it could guarantee that the control couldn't get asynchronously disposed. Not sure how to create such an object without it being bound to the window handle that might asynchronously disappear, though.
|
|
|
|
|
|
Nice post and nice links. Thanks
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Hmm... I'm probably barking up the wrong tree, but I'm not quite clear what the 'right' tree would be. What should happen, effectively, is that a message should get posted that the control will receive when convenient which asks it to refresh. To minimize excessive queueing of events, the control could have a variable which indicates whether an event has yet been queued and not yet received. The code that's considering sending the message should interlocked.Exchange this value to 1; if it was zero, send the refresh request. The code that handles the refresh should clear the value before performing the refresh.
Should some method other than .invoke be used to send the refresh request to the control? If so, what?
|
|
|
|
|
I am trying to use Microsoft Word Object Library v11 to convert word doc files into text format , it works fine on my local mechine but when I uploded it to server this error occurs "That assembly does not allow partially trusted callers"
Does any one know how to make the assamly fully trusted or is there any other way for convertion ?
x
|
|
|
|
|
Don't cross post (more than one forum) and certainly don't repost the same question, that's worse than spam.
I see you are a new member here. Welcome, but take the time to read some of the posting guidelines before people feel you are abusing the site resulting in you not getting any assistance.
led mike
|
|
|
|
|
I am trying to use Microsoft Word Object Library v11 to convert word doc files into text format , it works fine on my local mechine but when I uploded it to server this error occurs "That assembly does not allow partially trusted callers"
Does any one know how to make the assamly fully trusted or is there any other way for convertion ?
x
|
|
|
|
|
Hi,
Can anyone please tell me how to determine if ".Net Framework 2.0 SP1" is Installed, currently I am reading "Install" "dword entry" from registry path "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727" to find if .Net Framework 2.0 is installed or not, does anyone know how to determine about "Framework 2.0 SP1".
Thanks,
Mushq
|
|
|
|
|
Take a look at this article[^]. Also, if you're trying to do this as part of an installer, you shouldn't be using managed code.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Thanks.
Regards,
Mushq
|
|
|
|
|
|
|
Hi
I have a SecuGen fingerprint scanner. I want to integrate this scanner with a .NET application without using a SDK. Is it possible to acquire finger print from the scanner using .NET framework??? Thank u. Plz help..
|
|
|
|
|
If I am correct, their is no way to work with a fingerprint scanner from .NET. Their is a slight chance that you can do this through DirectX, but even still I would not count on it. You would have to use an SDK or third party utility to communicate with the fingerprint reader.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
It depends on how your scanner is connected to your computer. You may also have to do some low level homework.
What's wrong with using the SDK? At least you can call the function from your .Net app using p/Invoke.
Regards
|
|
|
|
|
i need to connect the finger print scanner in my application , but, I didn't have idea about that.because , i searched in lot. but, i cant able to get any basic structure for that codes. so, plzz any one can help me to implement scanner integration to My application.
I am using c# in VS 2005.
I am expecting your solutions for that problem.
Thank you.
|
|
|
|
|
Hello
is their somebody how knows if their is a component how can make a printform (with Oracle or mssql)
and then print it.
Thanks a lot
kosmas
|
|
|
|
|
If your data are displayed in a windows form you can use the MCL Form Print Control[^] to turn that into a nice structured printed document.
Otherwise you could look at report components : SQL Server Reporting Services, Crystal etc.
|
|
|
|
|
Hi i just stuck up with dotnet creating module in dotnetnuke 4.8.4, im beginer to dotnetnuke.
can any one help me? how to create a simple application in nuke 4.8.4?
Jayanthirajan P.
iam a software engineer working for varisis technologies bangalore
|
|
|
|
|
Have you looked through all the dotnetnuke doucmentation materials? Sure there has to be something that can shed light.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi
does anybody know me why MessageBox.Show() fails after setting a FileIOPermission PermitOnly() on a file??
{
FileIOPermission myFileIOPermission = new FileIOPermission(FileIOPermissionAccess.Write,@"C:\PermitOnly.txt");
myFileIOPermission.PermitOnly();
// this causes an exception...
MessageBox.Show(@"PermitOnly active");
// whereas this is fine
FileIOPermission.RevertPermitOnly();
MessageBox.Show(@"PermitOnly reverted");
}
thanks, John
|
|
|
|
|
cSharpJR wrote: why MessageBox.Show() fails after
define fails
|
|
|
|
|
hi
found out the answer I was looking for
basically, setting PermitOnly() on FileIOPermission meant that ALL other permissions are revoked, including default for UIPermission, hence the exception when displaying a message after calling FileIOPermission PermitOnly()
the solution lies in permission sets. Add the required file IO permission and a UI permission to a permission set and then call the permission set PermitOnly(), so (only) the group of permissions in the permission set are allowed
{
PermissionSet myPermissionSet = new PermissionSet(PermissionState.None);
FileIOPermission myFileIOPermission = new FileIOPermission(FileIOPermissionAccess.Write, @"C:\PermitOnly.txt");
UIPermission myUIPermission = new UIPermission(PermissionState.Unrestricted);
myPermissionSet.AddPermission(myFileIOPermission);
// test - comment out adding UI permission and MessageBox.Show() will fail due to no UI permission in permission set
myPermissionSet.AddPermission(myUIPermission);
myPermissionSet.PermitOnly();
MessageBox.Show("Permission set permit only active");
}
thanks, John
|
|
|
|