Question : How to put an graphic image on a Windows Forms app from the file browser dialog.

I have a VB.NET Windows Forms app with a logo image on the form as a System.Drawing.Bitmap inside a PictureBox. I used the Visual Studio Designer to add the logo .bmp image so I don't currently have any VB code doing anything with it.

I'd like to make the current logo a clickable object/button so when I click on it a file browser dialog opens and I can select a new image to replace the current image.

The current image is a local resource and is set in a PictureBox as a System.Drawing.Bitmap. How would I replace that System.Drawing.Bitmap with a file selected from the file browser dialog?

Answer : How to put an graphic image on a Windows Forms app from the file browser dialog.

That would be a security hole and thus is not possible. Please read what DLLs are really for: http://msdn.microsoft.com/en-us/library/ms682589%28VS.85%29.aspx

I still think that there is a difference between your applications (without and with DLL) that does not lie in the DLL call itself.
Please use ProcessExplorer to check your process privileges. I guess that SE_BACKUP_NAME is not one of them.
Random Solutions  
 
programming4us programming4us