myWebClient->DownloadProgressChanged += gcnew DownloadProgressChangedEventHandler( &Form1::DownloadProgressCallback );
gives the error:
1>.\Form1.cpp(26) : error C3352: ‘void Form1::DownloadProgressCallback(System::Object ^,System::Net::DownloadProgressChangedEventArgs ^)’ : the specified function does not match the delegate type ‘void (System::Object ^,System::Net::DownloadProgressChangedEventArgs ^)’
The documentation uses a static non member function as this delegate parameter, but I want to update a progress bar member of the Form1 class. What am I doing wrong here?
I am using .NET 2.0 so please keep the language as antiquidated as possible.
Pass the object to the delegate constructor.