Click here to Skip to main content
15,881,882 members

Comments by Alan N (Top 134 by date)

Alan N 31-May-23 10:56am View    
Really for something as simple as this! OK but if you don't bother to do any research yourself I may not reply again.

This statement executed within your custom DataGridView will give the form on which it is located.

Form containingForm = this.FindForm();
Alan N 30-Jun-22 10:25am View    
What is the string assigned to CompilerOptions that is causing the error?
Alan N 10-May-21 9:15am View    
To get any kind of answer you will have to provide code that makes sense. Just glancing at the current version of your question I wonder
1) What is the loop doing given that it does not use 'm' and we don't know what 's' contains.
2) Why when an exception occurs do you just try the same thing again.
3) Why dispose of the WebClient object when an async operation is still in progress.
4) Why is there no DownloadFileCompleted event handler
Alan N 19-Jan-21 18:30pm View    
What is the resource 'test'? I would expect it to be the contents of a zip file stored as byte[] in which case the correct way to get it back would be to cast 'resourcedata', e.g. byte[] zipcontent = resourcedata as byte[].

Your use of a BinaryFormatter to serialise the 'resourcedata' cannot be correct and will only transform it into something which is definitely not a zipfile.
Alan N 30-Oct-20 16:35pm View    
Shouldn't you reverse the order of steps 3 and 4 so that the saved bitmap is displayed by the PictureBox and the Photo Viewer?