{"id":3380,"date":"2014-03-23T13:50:14","date_gmt":"2014-03-23T13:50:14","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/23\/creating-thumbnail-previews-in-vb-net-collection-of-common-programming-errors-2\/"},"modified":"2014-03-23T13:50:14","modified_gmt":"2014-03-23T13:50:14","slug":"creating-thumbnail-previews-in-vb-net-collection-of-common-programming-errors-2","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/23\/creating-thumbnail-previews-in-vb-net-collection-of-common-programming-errors-2\/","title":{"rendered":"Creating thumbnail previews in VB.NET-Collection of common programming errors"},"content":{"rendered":"<p>So if you run the application in debug mode, take it out of the try\/catch block and you get no error at all? What happens when the application crashes, is there an exception message?. If you are still not getting an exception at all, I am not sure what to make of that. I am guessing it has something to do with an exception in the unmanaged windows code not being thrown or bubbled back up correctly.<\/p>\n<p>Instead of using the shell code from the post you referenced, you could use Image.GetThumbnail from the .NET framework for images (very simple), and a call to direct show to grab thumbnails for any supported video types.<\/p>\n<p>Image :<\/p>\n<pre><code>\/\/ create an image object, using the filename of the file\n   System.Drawing.Image image = System.Drawing.Image.FromFile(filename);\n\n\/\/ create the actual thumbnail image\n   System.Drawing.Image thumbnailImage = image.GetThumbnailImage(64, 64, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback), IntPtr.Zero);\n\n   public bool ThumbnailCallback()\n     {\n       return true;\n     }\n<\/code><\/pre>\n<p>Video :<\/p>\n<p>Check the post at : Video Thumbnail Creator<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So if you run the application in debug mode, take it out of the try\/catch block and you get no error at all? What happens when the application crashes, is there an exception message?. If you are still not getting an exception at all, I am not sure what to make of that. I am [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3380","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3380"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3380\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}