Registering the OnUploadProgress Event Handler in WinForms

Topics: User Forum
Jun 28, 2012 at 4:41 PM

Using v3.4.0 in a .net 4 winforms app.


I've seen sample code that illustrates registering the UploadProgress event like this: 

myFlickr.OnUploadProgress += new FlickrNet.Flickr.UploadProgressHandler(myFlickr_OnUploadProgress);


However UploadProgressHandler is not available under FlickrNet.Flickr.


Has this been deprecated?  If not, can someone show me how to register the event handler.



Jun 30, 2012 at 8:36 PM

No, the name of the handler is just different. The sample code is very old (at least I'm guessing the one you are looking at it).


Jun 30, 2012 at 8:58 PM

Sam, thanks for the reply.  Do you know the current name of the handler?  I don't see anything in the Object Browser that looks right.

Jun 30, 2012 at 8:59 PM
Edited Jun 30, 2012 at 9:00 PM

It's just of type EventHandler<FlickrNet.UploadProgressEventArgs>, so there isn't a specific event handler now.

myFlickr.OnUploadProgress += new EventHandler<FlickrNet.UploadProgressEventArgs>(myFlickr_OnUploadProgress);


Jun 30, 2012 at 10:11 PM

Thanks, Sam.

Got it working, although it's just firing once on FileComplete, but that's enough to drive a loop.

Jul 1, 2012 at 9:07 AM

Depending on the size of the file being uploaded you may only see the event fired once. I am in the process of looking at how often the event is fired to see if it can be improved so you may see the event more often in the future.