xod Posted January 23, 2017 Share Posted January 23, 2017 I saw on the BoltBait's site – beyond CodeLab – how to embed an icon but does not explain how to embed the Help file. If I Add Existing item and select the .rtf file then Embedded Resource nothing happens. The message showed in Help box is an error: System.ArgumentNullException: Value cannot be null. // Change the effect's window title props[ControlInfoPropertyNames.WindowTitle].Value = "Test01"; // Add help button to effect UI props[ControlInfoPropertyNames.WindowHelpContentType].Value = WindowHelpContentType.CustomViaCallback; props[ControlInfoPropertyNames.WindowHelpContent].Value = "Test01Effect.Test01.rtz"; Maybe someone can help me. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted January 23, 2017 Share Posted January 23, 2017 props[ControlInfoPropertyNames.WindowHelpContentType].Value = WindowHelpContentType.CustomViaCallback; The CustomViaCallback enum means you're going to provide your own custom function to handle the help content. CodeLab can generate example code for you: Spoiler Or do you already have that code generated from CodeLab? Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
xod Posted January 23, 2017 Author Share Posted January 23, 2017 (edited) Yes, I already have that code generated from CodeLab but the .rtf text is not showed in the Help window. Only the error. What I need to do? Edited January 23, 2017 by xod Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted January 23, 2017 Share Posted January 23, 2017 Did you make the RTF file an Embedded Resource? Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
xod Posted January 23, 2017 Author Share Posted January 23, 2017 Yes, I did. See my first post. Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted January 23, 2017 Share Posted January 23, 2017 Sorry, I misread your post. Perhaps the Namespace is not correct? Is the Default Namespace in your Project set to "Test01Effect"? And is your file named "Test01.rtz"? EDIT: Here's a screenshot, if that helps: Spoiler 1 Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
xod Posted January 23, 2017 Author Share Posted January 23, 2017 My file have rtf extension not rtz but I don't understand why in the code generated from CodeLab have rtz. The Namespace is correct. Ok, I'll see tomorow what is happening. Now is late. In my country it is time 23:20. Thank you for your help. Quote Link to comment Share on other sites More sharing options...
MJW Posted January 24, 2017 Share Posted January 24, 2017 Perhaps I don't understand what's going on, but in my VS projects, the help menu file always takes a name like Properties.Resources.Help, where the resource in the project is called Help. Likewise, the icon is Properties.Resources.Icon. They're defined (automatically by VS) in Properties>Resources.Designer.cs in code like, internal static string Help { get { return ResourceManager.GetString("Help", resourceCulture); } 1 Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted January 24, 2017 Share Posted January 24, 2017 Yes, that's another way to do it; using resource files (.resx). Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
BoltBait Posted January 24, 2017 Share Posted January 24, 2017 rtz is an rtf file that has been compressed. CodeLab compresses the help files to save space. You can use the following utility to compress your rtf file for embedding: CompressV2.zip (This was written by me. It compresses the help file the same way CodeLab does. It can also uncompress a file.) BTW, I don't want any bug reports on this utility. I wrote it for my own use and am sharing it now because I'm such a nice guy. 3 Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
xod Posted January 24, 2017 Author Share Posted January 24, 2017 Ok, now everything is working correct. Thanks BoltBait for this small utility. 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.