moc426 Posted June 10, 2007 Share Posted June 10, 2007 I can't get a png to load on a button. This normally works in c# but in pdn, the dll doesn't load the image. Any ideas? pdn does not crash so the image is referenced correctly, when it is not, it crashes when the effect is run. this.leftButton.Image = getIcon("AlignPlugin.Icons.left.png"); protected virtual Image getIcon( String filename ) { Assembly assembly = Assembly.GetExecutingAssembly();; Stream imageStream = assembly.GetManifestResourceStream( filename ); return new Bitmap(imageStream); } Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted June 10, 2007 Share Posted June 10, 2007 From what I remember, when visual styles are enabled (as they are in Paint.NET), you have to set the FlatStyle on the button to one of the values other than System. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
moc426 Posted June 10, 2007 Author Share Posted June 10, 2007 That did it, thank you very much sir! From what I remember, when visual styles are enabled (as they are in Paint.NET), you have to set the FlatStyle on the button to one of the values other than System. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.