Hi,
There is more to it than in your vb, I would have to rewrite it.
Realistically, I'm not going to write/rewrite extensions for you to everything you want.
I could help you learn to do it, but that really would require you having access to Visual Studio.
One option for you is to look into LDInline - see the sample that comes with LitDev samples in other-samples/LDInline-Reflection.sb with cs and vb code used. This can take extension code and compile it into a function to be used in SB. However, writing the CS code required to do what you want will be a steep learning curve - probably harder than writing the program directly in VS, requiring the use of reflection delegates to interact with the GraphicsWindow for example. PS, this method can also create extension dlls with xml intellisense - I forgot it could do that!
Also look into LDRichTextBox which can change individual word colours. See sample in other-samples/RichTextBox.sb.
I don't think this can easiliy be done for a textbox, your vb looks like it is for a winform textbox, not wpf and changing the selection colour is the colour for overlay when a word is selected, see https://stackoverflow.com/questions/3466...lects-text.
There is more to it than in your vb, I would have to rewrite it.
Realistically, I'm not going to write/rewrite extensions for you to everything you want.
I could help you learn to do it, but that really would require you having access to Visual Studio.
One option for you is to look into LDInline - see the sample that comes with LitDev samples in other-samples/LDInline-Reflection.sb with cs and vb code used. This can take extension code and compile it into a function to be used in SB. However, writing the CS code required to do what you want will be a steep learning curve - probably harder than writing the program directly in VS, requiring the use of reflection delegates to interact with the GraphicsWindow for example. PS, this method can also create extension dlls with xml intellisense - I forgot it could do that!
Also look into LDRichTextBox which can change individual word colours. See sample in other-samples/RichTextBox.sb.
I don't think this can easiliy be done for a textbox, your vb looks like it is for a winform textbox, not wpf and changing the selection colour is the colour for overlay when a word is selected, see https://stackoverflow.com/questions/3466...lects-text.