-
April 29th, 2014, 12:25 AM
#16
Re: Hide waitcursor when saving image to file
Try creating a test app, zip the complete solution and post it here.
-
April 29th, 2014, 10:39 AM
#17
Re: Hide waitcursor when saving image to file
SaveDelayTestApp.zip
The attached project is simple - set a timer, start the timer button and watch it save in a folder. Try 10 seconds or more please. Also, you can edit the code for the 'dir' variable to set a local directory you want.
-
April 29th, 2014, 07:58 PM
#18
Re: Hide waitcursor when saving image to file
I can try AsyncCallback() for now. Another user on MSDN forum posted a solution for it in a WPF setting - he simply uses asynctask and awai - not sure how it cna be implemented in WindowsForm. This is what he says:
http://social.msdn.microsoft.com/For...=csharpgeneral
-
April 29th, 2014, 09:00 PM
#19
Re: Hide waitcursor when saving image to file
Originally Posted by CM2013
Another user on MSDN forum posted a solution for it in a WPF setting - he simply uses asynctask and awai - not sure how it cna be implemented in WindowsForm.
As the other guy said, async is a .Net feature, not a Windows Form feature. Just use .Net 4.0 or above.
-
April 29th, 2014, 09:03 PM
#20
Re: Hide waitcursor when saving image to file
The .NET version is 4.5 - tried it in WPF and Form - didnt work - had errors. Iam thinking Action<Object> and creatign a new Task.factory.Startnew should work - but that didnt pan out as well. How can Action<Image> saveimg (Image img) function be used?
-
April 29th, 2014, 09:13 PM
#21
Re: Hide waitcursor when saving image to file
Completed it like this:
Task t2 = Task.Factory.StartNew(() =>
{
pictureBox1.Image.Save(fn, ImageFormat.Jpeg);
});
t2.wait() //to block the main thread letting this finish
-
April 29th, 2014, 09:21 PM
#22
Re: [RESOLVED] Hide waitcursor when saving image to file
NO. It did NOT resolve the issue for longer times - like a timer of 1 minute. Not even ASYNC works as it runs on the CPU anyway at the syetm-level.async Task does NOT work really.
-
April 29th, 2014, 09:21 PM
#23
Re: Hide waitcursor when saving image to file
Mod, mark it as Unresolved as it isn't.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|