I'm experimenting with help files and help-providers.
My issue is I cannot display the help file without conflicting with other help-provider code.
helpProvider1.SetShowHelp(btnFont, true);
helpProvider1.SetHelpString(btnFont, "Change the font.");
helpProvider1.HelpNamespace = "helpfile.chm";
The HelpNamespace property takes precedence over the SetHelpString method, but I still want to display these help strings.
Is the only option to use another hotkey?
Windows Forms supports "What's this .." help on individual controls (Pop-up Help). The HELP button makes sense on dialog boxes, because modal dialog boxes need to be closed before focus can go to another window. I think it's not a problem for you to translate the following samples from VB to C# (some old stuff but HTH). All this has a learn curve of course.
See Creating Pop-up Help for Visual Basic .NET controls
Please note: The Windows Forms HelpProvider component is used to associate HTML Help files (HTMLHelp 1.x, Help 2.x or single HTML file) with your Windows application. The HelpString property can be used to show Pop-Up Help but you must set the HelpNamespace property of hlpProvider1 (see HTML Help). If there is no filename and the user hits F1 the application runs to an error.
For further information see also Compiled HTML Help file shows "This program cannot display...", when pressing F1 on the debugged application.
Related
I am developing an application using Visual Studio 2019 and I am designing winforms.
Visual Studio commonly crashes when I am creating the forms by freezing, and recently my designed winform has somehow disappeared (even though I saved it). When i open it it shows as the default winform that is shown when a new one is created:
When I browse the solution explorer it seems that I can still see all the components I had added to the form:
Finally, when I try to restart and manually add the components back, I get an error message saying that the component can't be added due to duplication - which is probably because they are somehow still there (as shown in the solution explorer) but the data has been corrupted somehow:
If anybody has any idea of how to recover the data and the winform, I would very much appreciate it. If any additional information is required, please let me know. Thanks!
According to your description, first, the controls actually exist, but they are not
displayed in the design window.
You can try to check whether the. add statement of each control added to the window still
exists in the .Design.cs file.
If not, you can add it manually.
Second, solution explorer shows the missing components, but there is an error in adding
components. It means that only the declaration of this control in the .Design.cs file does
not assign a value to this control. You can delete the declaration of the component in the
.Design.cs file, and then add the component in the design interface.
Result:
I have a silverlight application with several menu buttons, each of which opens up a user control in a center "work space" area. It works fine. Now what I'd like to do is make some more user controls, compile them into a dll, and through say, a configuration file, have the silverlight app add a new menu button and make it make one of those new controls appear. The difficult part is, I'd like to be able to do this without recompiling the silverlight app. I'd like another developer to be able to make a user control that does some things, compile it into a dll, and drop it into the silverlight directory with some changes to a config file to get the main app to load it in. Is there a way I could do this?
Since noone else has replied yet:
What you want to do is reflect classes form a third-party dll at runtime. This is possibly too big a subject for SO, and all I can really recommend is looking up examples of it, and maybe the msdn section on it.
You'll also want to look up serialization and deserialization in C# and silverlight (this question might be a good start).
Sorry I can't be more help than that, but hopefully someone more experienced will weigh in with a useful article or some such.
Good luck :)
I'm looking to implement a spell checker on my win form app. The app need to be built in .Net 3.5 and I'm struggling to figure out what I need to do. I walked through an example of importing a Windows Presentation Form control that did this perfectly, but that control is only available in .Net 4 Framework.
Can anybody point me in the right direction on this please? I'm only using this control for the one richTextBox, so i dont want to spend too much time on this one element of my project.
Thanks
Add a TextBox to your form
In the XAML tab, add the following code between TextBox tags:
SpellCheck.IsEnabled = "True"
You can add the same code in the standard C# code window. Just enter:
textBox1.SpellCheck.IsEnabled = true;
3.Now, launch the application.
If you enter incorrect words, these are underlined in red. If you right-click the word, you get some spelling suggestions to correct.
I hope, thats what u wanted.
Hope these links may help you
http://coolthingoftheday.blogspot.com/2010/02/spell-check-enable-your-winform.html
http://www.codeproject.com/Articles/5277/NetSpell-Spell-Checker-for-NET
I'm making a text editor and trying to add the tabbed window capability to the textbox. I've been searching all over heck for info. Perhaps I'm not asking the question the right way as I keep getting the "accepts tab" posts etc. Does anyone know code or a post I could use? If you'd like to see my text editor it's at johnverber.com/dir it's a .exe file just so you're informed. But I've included a screen shot of my new version:
I would like to setup Feedback link on every windows form, so that user can send suggestion about design, functionality etc.. using C# (.NET 3.5) but I could not find solution.
Any help or suggestion will be appreciated.
On every form? You could create a "FeedbackLink" UserControl, and place that whereever you like. I wouldn't recommend trying to do it as a clever blanket-thing, because you can never assume the place you want the feedback hyperlink won't be used by something else.
My suggestion would actually be to add it to the "Help" menu on your main form, and possibly in some kind of (very intrusive) pop-up dialog. Maybe do it the way Visual Studio tackles it - by putting an icon in the systray with a bubble that pops up for the user to click on?
Example image (might take a second or two to appear):
Example http://www.freeimagehosting.net/uploads/b7939d58ae.png