Help Editor in VB - Printable Version +- BP Forums (https://bpforums.info) +-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55) +--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56) +---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8) +---- Thread: Help Editor in VB (/showthread.php?tid=402) |
Help Editor in VB - Covert2String - 09-24-2011 Hello, here I am asking for help again <!-- s --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="" title="Very Happy" /><!-- s -->. So, what I want is to know if there's a way to make a programm like a PHP editor, I want my application to "read" the code and change some keywords like "for", "while" to a specified color. Re: Help Editor in VB - xolara - 09-25-2011 Okay it might be abit tricky but you will have to make a new class file either inside your current program or in a new dll file but here is the code ive come up with and it works fine <!-- s --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="" title="Smile" /><!-- s --> Code: Imports System.Drawing Re: Help Editor in VB - brandonio21 - 09-25-2011 Well, you can try using something like this (Don't know how well it would work) Code: dim ss as integer = richtextbox1.selectionstart Re: Help Editor in VB - brandonio21 - 09-25-2011 xolara Wrote:Hey if you can provide me with the full syntax list ill have a library ready for you soon Wow. What a nice guy! Re: Help Editor in VB - xolara - 09-25-2011 Updated my post <!-- s --><img src="{SMILIES_PATH}/icon_razz.gif" alt="" title="Razz" /><!-- s --> Re: Help Editor in VB - brandonio21 - 09-25-2011 So apparently your programming skills have really improved, Xolara. Nice work. Re: Help Editor in VB - xolara - 09-25-2011 Been working on it for some time though just got around finishing it Re: Help Editor in VB - brandonio21 - 09-25-2011 xolara Wrote:Been working on it for some time though just got around finishing it Ah wow, very nice!! This could definitely come in handy Re: Help Editor in VB - xolara - 09-28-2011 Please report back to me about it <!-- s --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="" title="Smile" /><!-- s --> Re: Help Editor in VB - brandonio21 - 10-01-2011 I finally tried this out - It works great!!! Re: Help Editor in VB - brandonio21 - 10-04-2011 I have recently found this control as well: <!-- m --><a class="postlink" href="http://www.freevbcode.com/ShowCode.asp?ID=5176">http://www.freevbcode.com/ShowCode.asp?ID=5176</a><!-- m --> I believe it is free to use in all applications, but don't quote me on that. It includes very nice syntax highlighting, comment highlighting, and a very nice line number-er as well. Check it out! Re: Help Editor in VB - Covert2String - 10-18-2011 I think that control doesn't work anymore. And the code that Xolara posted, could anyone explain how I use it? XD Re: Help Editor in VB - brandonio21 - 10-18-2011 Covert2String Wrote:I think that control doesn't work anymore. Actually, I am using that control in both TwitControl and HTML-IDEx, and it works perfectly, and very nicely as well. It comes bundled with a sample project, so you can experiment with that to figure out how to use it. Quote: And the code that Xolara posted, could anyone explain how I use it? XD As per Xolara's code, I did use it, and it works fine, but right now it is late, tomorrow I'll try to get a nice explanation online. Re: Help Editor in VB - Covert2String - 10-19-2011 Well, I executed the example which was in the control's source, and it didn't changed the colour of the keywords. I'm using Visual Sudio 2010 btw. Edit: The control works great, thanks! Btw, do you know any control to use configuration files? file.cfg: name = "oo" age = "1" Just like this, but I have to be able to read & write data to the file in my application. Re: Help Editor in VB - brandonio21 - 10-19-2011 Yeah, it required a bit of tweaking to get the keywords to actually color themselves (For starters, the keywords had to actually be known). But I am glad you figured it out! And as for the configuration file control, I do not know of any offhand, because I have always coded it myself. Here is the code for reading a config file, if this helps at all. Code: Dim tNAME as string Of course, this is tedious because it needs to be done with every single option, but it is really easy to understand. Hope this helps! Re: Help Editor in VB - Covert2String - 10-21-2011 Thank you for the code, but I coded on by myself <!-- s --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="" title="Very Happy" /><!-- s --> It checks if the line contains a keyword and it reads after the =. Re: Help Editor in VB - brandonio21 - 10-21-2011 Very nice!! If you would like to, you can share your code snippet in the code snippet section! Re: Help Editor in VB - AnchoredFTW - 12-27-2011 Covert2String Wrote:Hello, here I am asking for help again <!-- s --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="" title="Very Happy" /><!-- s -->. So, what I want is to know if there's a way to make a programm like a PHP editor, I want my application to "read" the code and change some keywords like "for", "while" to a specified color. PHP Editor would be really difficult, but you can always try a HTML Editor by using a TextBox, a WebBrowser, another textbox and a button! Basically TextBox1 will be for the HTML code. So we don't really need any code on that one. Our WebBrowser1 doesn't need any code, neither does TextBox2. For Button1 just add (I keep thinking I'm working in Flash so I put on(release){ <!-- s --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="" title="Very Happy" /><!-- s -->): Code: WebBrowser1.Navigate(TextBox2.Text) |