|
Hi all, I am building a custom control that inherits from ListBox. I am overriding the WndProc Method to intercept WM_ERASEBKGND (0x014) to write a message on the listbox indicating that it is empty. When intercepted, I call a static method in some class that takes a string ("There are no items to show") and wraps it to fit the listbox width:
public static List<string> SplitSentence(string value, int width, Graphics g, Font f);
This will just break up the input string into whole words and build lines until the width is exceeded and add that line to the returned string collection.
My problem is that when I run my app, I get this: System.MissingMethodException: Method not found: 'System.Collections.Generic.List`1<System.String> Root.Library.ConvertTo.SplitSentence(System.String, Int32, System.Drawing.Graphics, System.Drawing.Font)'.
If I make the method a non-static method in the control class, it works fine. But if I leave it in the other static class (or a non-static class) in a different assembly, it doesn't. ??
|