help about clipboard
-
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?
-
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?
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..."
-
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..."
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 -
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 1978Thank 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..."
-
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..."
thanx all for assisstance