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
  1. Home
  2. General Programming
  3. C#
  4. set the position for ascii char in richtextbox

set the position for ascii char in richtextbox

Scheduled Pinned Locked Moved C#
help
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kamalesh5743
    wrote on last edited by
    #1

    Hi all, i need set the position for ascii char in richtextbox. Here is my coding that will show the ascii char in richtextbox. string hex = "040"; string hex1 = "025"; string hex2 = "023"; string hex3 = "025"; int code = Convert.ToInt32(hex,16); int code1 = Convert.ToInt32(hex1,16); int code2 = Convert.ToInt32(hex2,16); int code3 = Convert.ToInt32(hex3, 16); richTextBox1.Text = Encoding.Default.GetString(new byte[] {(byte)code,(byte)code1,(byte)code2,(byte)code3}); Now i need arrange all the ascii char in correct position.I hd tried in many ways,but still got errors.pls help me. Thank you. KAMALES

    X 1 Reply Last reply
    0
    • K kamalesh5743

      Hi all, i need set the position for ascii char in richtextbox. Here is my coding that will show the ascii char in richtextbox. string hex = "040"; string hex1 = "025"; string hex2 = "023"; string hex3 = "025"; int code = Convert.ToInt32(hex,16); int code1 = Convert.ToInt32(hex1,16); int code2 = Convert.ToInt32(hex2,16); int code3 = Convert.ToInt32(hex3, 16); richTextBox1.Text = Encoding.Default.GetString(new byte[] {(byte)code,(byte)code1,(byte)code2,(byte)code3}); Now i need arrange all the ascii char in correct position.I hd tried in many ways,but still got errors.pls help me. Thank you. KAMALES

      X Offline
      X Offline
      Xmen Real
      wrote on last edited by
      #2

      try in this way :

      byte mychar = 40;
      richTextBox1.Text = ((char)mychar).ToString();

      hope it will help

      TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN% Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y -------------------------------------------------------- 128 bit encrypted signature, crack if you can

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

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