Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
V

veluru krishna

@veluru krishna
About
Posts
15
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to view a file in a new window
    V veluru krishna

    hi all, I am presently creating a text editor for c# .In that application I would like to include one help file in the menu item for c#.I have written the help file in notepad and now when I click the c# menuitem it should open the help notepad to the viewer. can anyone tell me how to do this.

    Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.

    C# csharp help tutorial

  • how to open a file in a new window
    V veluru krishna

    hi all, I am presently creating a text editor for c# .In that application I would like to include one help file in the menu item for c#.I have written the help file in notepad and now when I click the c# menuitem it should open the help notepad to the viewer. can anyone tell me how to do this.

    Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.

    C# csharp help tutorial

  • how to highlight syntax after loading a file into a richtextbox
    V veluru krishna

    hi all, I am planning to implement a simple text editor in c#. Can anyone tell how to highlight the syntax after loading a file (which contains c# code) into a richtexbox.

    Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.

    C# csharp help tutorial

  • how to highlight syntax as soon as loading text file in to richtextbox
    V veluru krishna

    hi all, I am able to highlight the syntax when I type the text ie c# code in richtextbox using the following code code: // Calculate the starting position of the current line. int start = 0, end = 0; for (start = richTextBox1.SelectionStart - 1; start > 0; start--) { if (richTextBox1.Text[start] == '\n') { start++; break; } } // Calculate the end position of the current line. for (end = richTextBox1.SelectionStart; end < richTextBox1.Text.Length; end++) { if (richTextBox1.Text[end] == '\n') break; } // Extract the current line that is being edited. String line = richTextBox1.Text.Substring(start, end - start); // Backup the users current selection point. int selectionStart = richTextBox1.SelectionStart; int selectionLength = richTextBox1.SelectionLength; // Split the line into tokens. Regex r = new Regex("([ \\t{}();])"); string [] tokens = r.Split(line); int index = start; foreach (string token in tokens) { // Set the token's default color and font. richTextBox1.SelectionStart = index; richTextBox1.SelectionLength = token.Length; richTextBox1.SelectionColor = Color.Black; richTextBox1.SelectionFont = new Font("Courier New", 10, FontStyle.Regular); // Check whether the token is a keyword. String [] keywords = {"abstract","base","bool","break","byte","case","catch",,...."using","virtual","void" }; for (int i = 0; i < keywords.Length; i++) { if (keywords[i] == token) { // Apply alternative color and font to highlight keyword. richTextBox1.SelectionColor = Color.Blue; richTextBox1.SelectionFont = new Font("Courier New", 10, FontStyle.Bold); break; } } index += token.Length; } // Restore the users current selection point. richTextBox1.SelectionStart = selectionStart; richTextBox1.SelectionLength = selectionLength; But my aim is to write c# code in text file and load that text file into a richtext

    C# csharp database regex tutorial

  • syntax highlighting in c#
    V veluru krishna

    hi, how do i highlight syntax in c# as soon as I open a text file which contains c# code in it into a richtextbox in windowsforms.

    Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.

    C# csharp help question

  • using new line in saveFileDialog
    V veluru krishna

    hi, when use the following code SaveFileDialog dlg = new SaveFileDialog(); dlg.Filter = "Text Files|*.txt|Comma Seperated Files|*.csv|All Files|*.*"; dlg.InitialDirectory = @"C:\"; saveFileDialog1.OverwritePrompt = true; if (dlg.ShowDialog() == DialogResult.OK) { using (System.IO.StreamWriter writer = new System.IO.StreamWriter(dlg.FileName)) { writer.Write(this.richTextBox1.Text); writer.Flush(); } } it saves a file but unfortunately it saves it without newline characters ie.,. I want to save my work as it is displayed in the multiline text box.can you help me please

    Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.

    C# help

  • how to use saveFileDialog
    V veluru krishna

    hi, when use the code given by you it saves a file but unfortunately it saves it without newline characters ie.,. I want to save my work as it is displayed in the multiline text box.can you help me please

    Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.

    C# csharp help tutorial

  • how to use openFileDialog
    V veluru krishna

    hi, I know how to browse a file and read the data from the file into a richtextbox in windowsform but my problem is I am not able print each file as it is but I am able to print just as appending to each line using the following code: code : OpenFileDialog dlg = new OpenFileDialog(); dlg.Title = "Open text file"; dlg.InitialDirectory = @"c:\"; dlg.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*"; if (dlg.ShowDialog() == DialogResult.OK) { StreamReader sr = File.OpenText(dlg.FileName); string s = sr.ReadLine(); StringBuilder sb = new StringBuilder(); while (s != null) { sb.Append(s); s = sr.ReadLine(); } sr.Close(); this.richTextBox1.Text = sb.ToString(); } can you please help me to read file as it is with newline characters to richtexbox

    Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.

    C# help tutorial

  • how to use openFileDialog
    V veluru krishna

    Hi all, how to open a text file

    Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.

    C# help tutorial

  • Text editor in c#
    V veluru krishna

    i am sorry i doesn't mean it i am looking for a sample code that is a part of it not the whole

    Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.

    C# csharp help tutorial

  • how to use saveFileDialog
    V veluru krishna

    how to save a file in c#

    Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.

    C# csharp help tutorial

  • Text editor in c#
    V veluru krishna

    can you send the code to yahoo id mine is veluru_kc@yahoo.com

    Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.

    C# csharp help tutorial

  • Text editor in c#
    V veluru krishna

    I have tried using that but unfortunately it is getting timeout before my due date .can you post any code u have for text editor in c#

    Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.

    C# csharp help tutorial

  • Text editor in c#
    V veluru krishna

    can anyone tell me how to create text editor in c#.

    Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.

    C# csharp help tutorial

  • Text editor
    V veluru krishna

    Can anyone help me implementing a text editor in c#.

    Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.

    C / C++ / MFC csharp help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups