Click here to Skip to main content
15,912,897 members
Home / Discussions / C#
   

C#

 
GeneralRe: hello, it's me the C# n00b again, I have some questions about C# ^_^; Pin
Heath Stewart12-May-04 11:11
protectorHeath Stewart12-May-04 11:11 
GeneralRe: hello, it's me the C# n00b again, I have some questions about C# ^_^; Pin
TigerNinja_12-May-04 12:14
TigerNinja_12-May-04 12:14 
GeneralRe: hello, it's me the C# n00b again, I have some questions about C# ^_^; Pin
C# n00b12-May-04 14:10
C# n00b12-May-04 14:10 
GeneralRe: hello, it's me the C# n00b again, I have some questions about C# ^_^; Pin
Dave Kreskowiak12-May-04 14:26
mveDave Kreskowiak12-May-04 14:26 
GeneralCOM registration Pin
student666912-May-04 9:25
student666912-May-04 9:25 
GeneralRe: COM registration Pin
Heath Stewart12-May-04 9:42
protectorHeath Stewart12-May-04 9:42 
GeneralTextBox: erasing the old lines Pin
goldoche12-May-04 9:11
goldoche12-May-04 9:11 
GeneralRe: TextBox: erasing the old lines Pin
Jeff Varszegi12-May-04 9:25
professionalJeff Varszegi12-May-04 9:25 
I'm still not all that familiar with Windows Forms, although I've studied it. Can't you do something like this? (Warning: poorly-designed code)

C#
    public static void RemoveTopLines(TextBox textBox, int linesToRemove) {
        if (textBox == null) {
            throw new ArgumentNullException();
        }
        else if (linesToRemove < 0) {
            throw new ArgumentException("Invalid line count (" + linesToRemove + ")");
        }
        string[] lines = textBox.Lines;
        int currentLineCount = lines.Length;
        int newLineCount = lines.Length - linesToRemove;
        if (newLineCount < 0) {
            newLineCount = 0;
        }
        string[] newLines = new string[newLineCount];
        if (newLineCount > 0) {
            Array.Copy(lines, linesToRemove, newLines, 0, newLineCount);
        }
        textBox.Lines = newLines;
    }

GeneralRe: TextBox: erasing the old lines Pin
leppie12-May-04 13:25
leppie12-May-04 13:25 
GeneralRe: TextBox: erasing the old lines Pin
Jeff Varszegi13-May-04 2:02
professionalJeff Varszegi13-May-04 2:02 
GeneralDebugging Pin
Anonymous12-May-04 9:00
Anonymous12-May-04 9:00 
GeneralRe: Debugging Pin
Jeff Varszegi12-May-04 9:06
professionalJeff Varszegi12-May-04 9:06 
GeneralRe: Debugging Pin
Jeff Varszegi12-May-04 9:33
professionalJeff Varszegi12-May-04 9:33 
GeneralRe: Debugging Pin
Anonymous12-May-04 12:56
Anonymous12-May-04 12:56 
GeneralSystem.Environment.MachineName exception Pin
Member 9993512-May-04 8:39
Member 9993512-May-04 8:39 
GeneralRe: System.Environment.MachineName exception Pin
Jeff Varszegi12-May-04 9:03
professionalJeff Varszegi12-May-04 9:03 
GeneralRe: System.Environment.MachineName exception Pin
Member 9993512-May-04 9:05
Member 9993512-May-04 9:05 
GeneralRe: System.Environment.MachineName exception Pin
Jeff Varszegi12-May-04 9:08
professionalJeff Varszegi12-May-04 9:08 
GeneralRe: System.Environment.MachineName exception Pin
Member 9993512-May-04 9:22
Member 9993512-May-04 9:22 
GeneralRe: System.Environment.MachineName exception Pin
Jeff Varszegi12-May-04 9:32
professionalJeff Varszegi12-May-04 9:32 
GeneralRe: System.Environment.MachineName exception Pin
Member 9993512-May-04 9:45
Member 9993512-May-04 9:45 
GeneralRe: System.Environment.MachineName exception Pin
Heath Stewart12-May-04 9:33
protectorHeath Stewart12-May-04 9:33 
GeneralRe: System.Environment.MachineName exception Pin
Member 9993512-May-04 9:40
Member 9993512-May-04 9:40 
GeneralRe: System.Environment.MachineName exception Pin
Member 9993512-May-04 9:43
Member 9993512-May-04 9:43 
GeneralRe: System.Environment.MachineName exception Pin
Heath Stewart12-May-04 9:45
protectorHeath Stewart12-May-04 9:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.