add code syntax color winforms [duplicate] - c#

This question already has answers here:
A textbox/richtextbox that has syntax highlighting? [C#] [closed]
(8 answers)
Closed 7 years ago.
In my winform application I allow the user to write/read some c# code (simple text in a RichTextBox, I would like to add the functionality to highlight the syntax like VS or notepad++ does, nothing advanced like intellisense and so on, just the text colour change would do.
I've been looking around but I couldn't find anything, do you know if there's a ready to use library or something that I can use?

I found FastColoredTextBox component which seems to be exactly what I need, answering in here in case someone else needs it.

Related

Not sure what this tool is called [duplicate]

This question already has answers here:
How to create an Explorer-like folder browser control?
(3 answers)
Closed 5 years ago.
Not sure if this is off topic or not, if it is i will gladly delete.
I am converting one of my companies utility programs to C#.NET in winforms it is written in vb6, DEFINITELY NOT .NET as it is 15 years old. and in the UI it has a tool which looks like this
it acts like a folder browser put stays on the UI unlike a folder browser dialog which is a popup. is there a .NET tool which does the same thing or do i have to use a folder browser dialog. ideally i would like to keep it on the screen because i think it looks better to keep it on the screen rather than a separate box. if anyone knows if this is actually a tool in C#.NET winforms or not that would be great
Yes these controls are no longer avaiable in .net, you can create one yourself relatively easily, here is a MSDN link describing what you want
https://msdn.microsoft.com/en-us/library/ms171645(v=vs.110).aspx

Textbox Tag Style in WPF [duplicate]

This question already has answers here:
Tag editing in a WPF TextBox
(2 answers)
Closed 7 years ago.
I'm not sure what is the correct term for this style but, can this style be possible in WPF textbox? More often, I see this here in this community when you asked a question and you are mandatory to put a Tags.
Sample Textbox Output
Thanks
I think you are looking for Tokenizing Control – Convert Text to Tokens Most of the work has already been done there you just need to modify the template according to what and how you wanted to show the controls

Read word from external application from the cursor position [duplicate]

This question already has answers here:
C# window application get word from the cursor position from the other application
(7 answers)
Closed 9 years ago.
I have window application of Hotkey and pressing hotkey (e.g. Ctrl + 1) I want a text from the cursor position from the external application like notepad, notepad++, Microsoft Word, Browsers etc.
This functionality is already implemented in "WordWeb" Application Hotkey. The same functionality I expect.
Please help me with sample code if any one have idea.
There is no a simple way to do this. The possible ways are OCR, using of Accessibility API and winapi hooking. Probably you should narrow your problem statement before taking any further steps.

Easy way to create MessageBox with "custom button" [duplicate]

This question already has answers here:
Custom button captions in .NET messagebox?
(8 answers)
Closed 9 years ago.
I've a winform application, and we are trying to make it ergonomic as possible, so we respect a lot microsoft guidelines.
We have some "Deletion confirmation" to implement, and according the guidelines and what I found accross the web, the more adequate buttons would be:
Delete and Cancel
But since we use the MessageBoxButtons to specify which buttons we have to display, I can't see how we can do this except implementing ourself a confirmation dialog.
I don't find very logical that microsoft encourage in one side the use of "action" text on button, and the other side doesn't give us the tools to be compliant, so I think I'm missing something?
Please note that I don't need more results possibility than currently, My Delete option would be the same as Ok for me, I just want to have differents texts.
So: Is there a way to specify easily buttons we want to show different text here?
There is no easy way other than creating your own implementation using form and show it as dialog?
We did the same some time back because of localization specialities in our project.

How do you make a program with multiple "Pages"? [duplicate]

This question already has answers here:
Creating Wizards for Windows Forms in C#
(3 answers)
Closed 9 years ago.
How do you make something like the things where you install programs by clicking the "Next" button and it will show you like a TextBox instead of a ComboBox like on a new Panel?
Sort of like changing Tabs on a TabControl but without showing the tabs.
You are probably looking for Wizard. You may see
Simple Wizard for Winforms - CodeProject
You may also take a look at WinForms Wizard from DevExpress but its not free.

Categories

Resources