Simon Brown Posted September 23, 2009 Share Posted September 23, 2009 No luck changing everything, although re-adding the controls to the form may work. Quote Link to comment Share on other sites More sharing options...
APShredder Posted September 23, 2009 Author Share Posted September 23, 2009 Ok I'll try that then. Thanks for all your help. Quote BlendModes Plus | Dissolve | Extract Color Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 24, 2009 Share Posted September 24, 2009 Why're you using controls from Paint.NET's DLL's? You're not supposed to do that. 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...
APShredder Posted September 24, 2009 Author Share Posted September 24, 2009 Sorry Rick, I didn't know how to get them any other way. Maybe you could give me a little advice on how to access those controls without using Paint.NET's DLLs. Quote BlendModes Plus | Dissolve | Extract Color Link to comment Share on other sites More sharing options...
pyrochild Posted September 24, 2009 Share Posted September 24, 2009 Use Reflector and copy the code. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
APShredder Posted September 24, 2009 Author Share Posted September 24, 2009 *facepalm* I don't know why I didn't realize that before. Thanks pyrochild. Quote BlendModes Plus | Dissolve | Extract Color Link to comment Share on other sites More sharing options...
APShredder Posted September 24, 2009 Author Share Posted September 24, 2009 Ok, well I almost got copying the code to work, except I'm still getting a error message. I've tried everything I can think of (which isn't all that much) to get rid of it, but it won't go away. :? Error Message: 'ExtractColor.GradientControl.Dispose(bool)': no suitable method found to override And of course here's the code that's causing the error. namespace ExtractColor { partial class GradientControl { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Component Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { components = new System.ComponentModel.Container(); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; } #endregion } } Quote BlendModes Plus | Dissolve | Extract Color Link to comment Share on other sites More sharing options...
Simon Brown Posted September 24, 2009 Share Posted September 24, 2009 Try implementing IDisposable. Edit: Also note that it's a partial class, so presumably there's more in another file. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 24, 2009 Share Posted September 24, 2009 Use Reflector and copy the code. Yes. 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...
APShredder Posted September 25, 2009 Author Share Posted September 25, 2009 Try implementing IDisposable. Sorry for sounding like a total idiot, but could you show me an example of what you mean? Quote BlendModes Plus | Dissolve | Extract Color Link to comment Share on other sites More sharing options...
Simon Brown Posted September 25, 2009 Share Posted September 25, 2009 You basically do it the same way as inheriting from a class. Quote Link to comment Share on other sites More sharing options...
APShredder Posted September 25, 2009 Author Share Posted September 25, 2009 Ok well I tried doing that, but all I got was a new error message. 'ExtractColor.GradientControl' does not implement interface member 'System.IDisposable.Dispose()' I get that along with the other message I was getting before. using System; namespace ExtractColor { partial class GradientControl : [b]IDisposable[/b] { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Component Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { components = new System.ComponentModel.Container(); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; } #endregion } } Quote BlendModes Plus | Dissolve | Extract Color Link to comment Share on other sites More sharing options...
Simon Brown Posted September 25, 2009 Share Posted September 25, 2009 Try replacing the dispose method with: /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected virtual void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } this.Dispose(disposing); } public void Dispose() { Dispose(true); } Quote Link to comment Share on other sites More sharing options...
APShredder Posted September 25, 2009 Author Share Posted September 25, 2009 OK, that got rid of the second error message, but I still have the first one. 'ExtractColor.GradientControl.Dispose(bool)': no suitable method found to override Quote BlendModes Plus | Dissolve | Extract Color Link to comment Share on other sites More sharing options...
Simon Brown Posted September 25, 2009 Share Posted September 25, 2009 Just to be clear, replace the current code with: using System; namespace ExtractColor { partial class GradientControl : [b]IDisposable[/b] { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected virtual void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } this.Dispose(disposing); } public void Dispose() { Dispose(true); } #region Component Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { components = new System.ComponentModel.Container(); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; } #endregion } } Quote Link to comment Share on other sites More sharing options...
APShredder Posted September 25, 2009 Author Share Posted September 25, 2009 Using that code just created about twenty more errors. Something's not right here, but I don't know what. :? Quote BlendModes Plus | Dissolve | Extract Color Link to comment Share on other sites More sharing options...
Simon Brown Posted September 25, 2009 Share Posted September 25, 2009 What are the errors saying? Quote Link to comment Share on other sites More sharing options...
APShredder Posted September 25, 2009 Author Share Posted September 25, 2009 'ExtractColor.GradientControl' does not contain a definition for 'AutoScaleMode' and no extension method 'AutoScaleMode' accepting a first argument of type 'ExtractColor.GradientControl' could be found (are you missing a using directive or an assembly reference?) The name 'PixelOffsetMode' does not exist in the current context The type or namespace name 'InvalidEnumArgumentException' could not be found (are you missing a using directive or an assembly reference?) There's a bunch of those. The type or namespace name 'LinearGradientBrush' could not be found (are you missing a using directive or an assembly reference?) The name 'SmoothingMode' does not exist in the current context Cannot implicitly convert type 'PaintDotNet.ColorGradientControl' to 'ColorGradientControl' There's a bunch of those too. These are pretty much all the errors and there are some warning messages too, which I can post if you want to see them. Quote BlendModes Plus | Dissolve | Extract Color Link to comment Share on other sites More sharing options...
pyrochild Posted September 26, 2009 Share Posted September 26, 2009 I think you need to learn more of the basics of C# and programming in general... Simon is not your personal tutor/debugger. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
APShredder Posted September 26, 2009 Author Share Posted September 26, 2009 As much as I hate to admit it, you're probably right. I've been trying to figure out something more then just the basics, but I can't find anything that really helps me. I've tried reading source codes from different plugins, I've tried finding online tutorials, but nothing every really helps. So, maybe it's better if I step away from programming for right now. Or on second thought maybe you could tell me somewhere where I can learning more than the basics. I'd really appreciate it. Quote BlendModes Plus | Dissolve | Extract Color Link to comment Share on other sites More sharing options...
pyrochild Posted September 26, 2009 Share Posted September 26, 2009 No no no, I don't mean to discourage you from programming. I'm just trying to say, start with a foundation instead of trying to start with the electricity and plumbing. Have you looked at BoltBait's CodeLab tutorials? Google is also a very good resource for either tutorials or looking up any error messages you get. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
APShredder Posted September 26, 2009 Author Share Posted September 26, 2009 Yeah, I get what you're saying. After reading your post, I decided I was high time I actually learn programming from someone other than myself. You see, everything I know so far, I taught myself. I never had any kind of tutoring from anyone other than a few online tuts. So I googled a few C# websites, and I'm starting my programming education over. So I have to say thank you pyrochild, for helping me realize that I needed to learn the basics before I could do anything too advanced. Quote BlendModes Plus | Dissolve | Extract Color Link to comment Share on other sites More sharing options...
pyrochild Posted September 26, 2009 Share Posted September 26, 2009 I better see some awesome plugins coming from you soon Also, don't be afraid to ask for help on this forum -- that's what it's for, after all. Just try not to turn it into "write my plugin for me." Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
oma Posted September 26, 2009 Share Posted September 26, 2009 don't get discouraged. I've been reading and re reading C+ book for over a year. just starting to get the idea of what's what. I haven't even tried to do a plugin yet. you are way ahead of me. keep at it. go slow, try not to get discouraged. ciao OMA Quote  My Deviant Art Gallery Oma's Paint.Net gallery Link to comment Share on other sites More sharing options...
APShredder Posted September 26, 2009 Author Share Posted September 26, 2009 I better see some awesome plugins coming from you soon Don't worry I plan to. :wink: Also, don't be afraid to ask for help on this forum -- that's what it's for, after all. Just try not to turn it into "write my plugin for me." Don't worry about that either. I'll probably still have a bunch of questions along the way though.don't get discouraged. I've been reading and re reading C+ book for over a year. just starting to get the idea of what's what. I haven't even tried to do a plugin yet. you are way ahead of me. keep at it. go slow, try not to get discouraged. ciao OMA Thanks for the wise words of encouragement oma. Quote BlendModes Plus | Dissolve | Extract Color 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.