We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

VBScript Comment/Uncomment

Thread ID:





88233 Jul 17,2009 01:56 PM UTC Aug 21,2009 04:49 AM UTC WinForms 2
Tags: EditControl
John Brett
Asked On July 17, 2009 01:56 PM UTC

Using the predefined VBScript syntax, the Comment Selection command works, surrounding the code with an xml comment .

For my purposes, I've changed this to use the VBScript REM command, and the Editor works correctly on commenting again.

However, in neither case does the Uncomment command work. It simply does nothing (no exceptions are thrown, nothing is written to the debug window). Can you tell me why this doesn't work?


Nandakumar R [Syncfusion]
Replied On August 21, 2009 04:48 AM UTC


I regret for the inconvenience caused. Your DirectTrac incident has been updated with the details. There seem to be some issues with the lexem based changes when you try to make one. You can use the following workaround in the uncomment section and achieve this behaviour.


private void Form1_Load(object sender, EventArgs e)
//Set start and end comment

IConfigLanguage lan = this.editControl1.Language;
lan.StartComment = "REM ";
lan.EndComment = "";

private void btnComment_Click(object sender, EventArgs e)

private void btnUncomment_Click(object sender, EventArgs e)
string CommentedText = this.editControl1.SelectedText;
CommentedText = CommentedText.Replace(@"REM ", "");
editControl1.SelectedText = CommentedText.Replace(@"REM ", "");


Nandakumar R [Syncfusion]
Replied On August 21, 2009 04:49 AM UTC


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon