I have a web browser I’m using in my VB.net form to which I drag *.CTB files. At present I can drag any file type into the browser can I limit this to CTB file extensions only and if the user ties to drag in any other extension that a message box appears quoting that the file must be ctb extension?
Share
The WebBrowser control is handling the drag/drop functionality so you might not be able to (easily) intercept that. Instead, you could handle the
Navigatingmethod and cancel the navigation if the file type is incorrect. (You might want to do a more robust check for the extension).