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. help about clipboard

help about clipboard

Scheduled Pinned Locked Moved C#
csharphelptutorialquestion
5 Posts 3 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.
  • H Offline
    H Offline
    Hesham Amin
    wrote on last edited by
    #1

    Hi all, I'm writing a notepad-like program using C# I want to use the Popup event of the Edit menu to disable the paste menu command when the clipboard does not contain any text. can any one help? also how to get the Ascii code for a character and vise-vesa?

    D 1 Reply Last reply
    0
    • H Hesham Amin

      Hi all, I'm writing a notepad-like program using C# I want to use the Popup event of the Edit menu to disable the paste menu command when the clipboard does not contain any text. can any one help? also how to get the Ascii code for a character and vise-vesa?

      D Offline
      D Offline
      Domenic Denicola
      wrote on last edited by
      #2

      You would need to add this code to disable a menu item: MenuItem.Enabled = false; And check out the Clipboard subtopics in the index of the .NET Framework SDK Documentation for clipboard info. hspc wrote: also how to get the Ascii code for a character and vise-vesa? I also would like to know this

      -Domenic Denicola- [CPUA 0x1337] MadHamster Creations "I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."

      J 1 Reply Last reply
      0
      • D Domenic Denicola

        You would need to add this code to disable a menu item: MenuItem.Enabled = false; And check out the Clipboard subtopics in the index of the .NET Framework SDK Documentation for clipboard info. hspc wrote: also how to get the Ascii code for a character and vise-vesa? I also would like to know this

        -Domenic Denicola- [CPUA 0x1337] MadHamster Creations "I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."

        J Offline
        J Offline
        James T Johnson
        wrote on last edited by
        #3

        if your text is stored in single-byte strings you can convert a character to a byte and the value will be the ASCII code. By default strings are stored as Unicode and the char type is two bytes instead of one to reflect this. You can convert a string to ASCII bytes by using byte [] bytes = System.Text.ASCIIEncoding.ASCII.GetBytes(myString); HTH, James Sonork ID: 100.11138 - Hasaki "Smile your little smile, take some tea with me awhile. And every day we'll turn another page. Behind our glass we'll sit and look at our ever-open book, One brown mouse sitting in a cage." "One Brown Mouse" from Heavy Horses, Jethro Tull 1978

        D 1 Reply Last reply
        0
        • J James T Johnson

          if your text is stored in single-byte strings you can convert a character to a byte and the value will be the ASCII code. By default strings are stored as Unicode and the char type is two bytes instead of one to reflect this. You can convert a string to ASCII bytes by using byte [] bytes = System.Text.ASCIIEncoding.ASCII.GetBytes(myString); HTH, James Sonork ID: 100.11138 - Hasaki "Smile your little smile, take some tea with me awhile. And every day we'll turn another page. Behind our glass we'll sit and look at our ever-open book, One brown mouse sitting in a cage." "One Brown Mouse" from Heavy Horses, Jethro Tull 1978

          D Offline
          D Offline
          Domenic Denicola
          wrote on last edited by
          #4

          Thank you!

          -Domenic Denicola- [CPUA 0x1337] MadHamster Creations "I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."

          H 1 Reply Last reply
          0
          • D Domenic Denicola

            Thank you!

            -Domenic Denicola- [CPUA 0x1337] MadHamster Creations "I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."

            H Offline
            H Offline
            Hesham Amin
            wrote on last edited by
            #5

            thanx all for assisstance

            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