Results 1 to 8 of 8

Thread: a delete escape character?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2003
    Location
    US
    Posts
    68

    a delete escape character?

    does any 1 know of an escae character ican use to simulate a delete key? i tried \127 & \008 but cant get either to work, i need somethihg i can use like \r\n for return and newline but to actually delete that space. Is there a better way to do this? thanx

  2. #2
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: a delete escape character?

    VB Code:
    1. private void frmchild_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
    2.         {
    3.             if(e.KeyCode==Keys.Delete) MessageBox.Show("");
    4.         }
    This one? If not, sorry.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2003
    Location
    US
    Posts
    68

    Re: a delete escape character?

    i need an escape character, that i can place inside a string to manipulate text programmatically. like if you put \r\n inside a label.Text will enter a return character. its a C thing. thanx though

  4. #4
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: a delete escape character?

    Don't know if there's an escape character for delete but here's the list from Peter Burden's tutorial
    VB Code:
    1. Octal   Hex Escape  Input   Name
    2. 000 00      Ctrl-@  Null - does nothing
    3. 001 01      Ctrl-A  SOH
    4. 002 02      Ctrl-B  STX
    5. 003 03      Ctrl-C  ETX - Sometimes Break Program
    6. 004 04      Ctrl-D  EOT - Sometimes End of File
    7. 005 05      Ctrl-E  ENQ
    8. 006 06      Ctrl-F  ACK
    9. 007 07  \a  Ctrl-G  BEL - Audible Signal
    10. 010 08  \b  Ctrl-H  BS  - Backspace
    11. 011 09  \t  Ctrl-I  HT  - TAB
    12. 012 0a  \n  Ctrl-J  NL  - Newline
    13. 013 0b  \v  Ctrl-K  VT  - Vertical TAB
    14. 014 0c  \f  Ctrl-L  FF  - New Page or Clear Screen
    15. 015 0d  \r  Ctrl-M  CR  - Carriage Return
    16. 016 0e      Ctrl-N  SO
    17. 017 0f      Ctrl-O  SI
    18. 020 10      Ctrl-P  DLE
    19. 021 11      Ctrl-Q  DC1 - Flow Control - On
    20. 022 12      Ctrl-R  DC2
    21. 023 13      Ctrl-S  DC3 - Flow Control - Off
    22. 024 14      Ctrl-T  DC4
    23. 025 15      Ctrl-U  NAK - Sometimes Line Delete
    24. 026 16      Ctrl-V  SYN
    25. 027 17      Ctrl-W  ETB
    26. 030 18      Ctrl-X  CAN - Sometimes Line Delete
    27. 031 19      Ctrl-Y  EM
    28. 032 1a      Ctrl-Z  SUB - Sometimes End of File
    29. 033 1b      Ctrl-[  ESC - Often Escape for Screen Control
    30. 034 1c      Ctrl-\  FS
    31. 035 1d      Ctrl-]  GS
    32. 036 1e      Ctrl-^  RS
    33. 037 1f      Ctrl-_  US
    34. 040 20          SP  - Space - Hit the space bar

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Mar 2003
    Location
    US
    Posts
    68

    Re: a delete escape character?

    Yeah i tried backspace but word doesnt reconize it for what i need, so 127 and 177 were the ascii values that i tried earlier. would be nice for a \D but cant find it even tried simulating ^Del but nothing.

  6. #6
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357

    Re: a delete escape character?

    Can you be more specific about what you are trying to accomplish? There may be a better solution for what you are trying to do just by using some of the methods in the string class.
    ~seaweed

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Mar 2003
    Location
    US
    Posts
    68

    Re: a delete escape character?

    i am adding a digital signature to a document using the word object and a bookmark, but some of those docs have an underline where the signature needs placed. so i was trying to delete the length of the signature from the document then place in the signature.

  8. #8
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357

    Re: a delete escape character?

    Not sure if this helps, but you can use the Range object to delete text in Word (Set the range to the signature that you want to delete, and call the Delete method of the Range). There's an example here:

    http://msdn.microsoft.com/library/de...WordObject.asp
    ~seaweed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width