Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Pls help me(Replace Enter Key)

prasanthieprasanthie Member Posts: 1
Couls someone pls help me i this
I need to replace the enter key with "
"
We used to do this in asp as
replace(char(13),"
)
How do i do this in C#


Comments

  • JCrouchJCrouch Member Posts: 9
    : Couls someone pls help me i this
    : I need to replace the enter key with ""
    : We used to do this in asp as
    : replace(char(13),")
    : How do i do this in C#
    :
    :
    :
    :Here is a way for a multiline textbox:

    private void textBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
    {
    if(e.KeyChar == (char)13)
    {
    TextBox myBox = new TextBox();
    myBox = (TextBox)sender;
    myBox.AppendText("
    ");
    e.Handled = true;
    }
    }

    You should be able to adapt it for other controls as well :)
  • Andre YoungAndre Young USAMember Posts: 0

    _________ || http://forcoder.org || free ebooks and video tutorials about [ Python, MATLAB, Java, Go, Assembly, JavaScript, R, Scratch, C#, Visual Basic .NET, Ruby, Visual Basic, Swift, PL/SQL, C++, C, Objective-C, PHP, Delphi, Perl Erlang, Crystal, Prolog, FoxPro, COBOL, Logo, Dart, Lisp, Scheme, F#, Alice, Clojure, Lua, Transact-SQL, Scala, Ada, Awk, LabVIEW, Hack, Bash, VBScript, Kotlin, D, ABAP, Apex, Fortran, Rust, SAS, Julia, ML ] __________

Sign In or Register to comment.