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
C

conrado7

@conrado7
About
Posts
23
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Controlled Focus event - textBox
    C conrado7

    I tried to count but in different way - it doesn`t work. Your way works great! Thanks a lot!

    C# help

  • Checking for valid XML file structure
    C conrado7

    I need in my application to check if the data structure is correct in XML file which I read. How can I do that? Only message if it`s correct or not I need. Thanks

    XML / XSL question xml

  • Controlled Focus event - textBox
    C conrado7

    I need leave my textBox control only if I press three times the Tab key. I use this: private void KKEditControl_Leave(object sender, EventArgs e) { this.Focus(); } but it keeps focus in my textBox all the time. Please help me...

    C# help

  • Formating text in textBox
    C conrado7

    I know what you mean, but it isn`t the action I want. I don`t want replace all characters in my textBox but I want replace only that character which is curently selected by the posision of the cursor. For example text: 12345 when the cursor is (for ex.) between 3 and 4 by enter new character a want replace character 4 by new one. This should work like insert key in Microsoft Word. Anyone know the answer?

    C# help question

  • Formating text in textBox
    C conrado7

    I want in my textBox enter characters in the following way: private void textBox2_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { int i = this.textBox2.SelectionStart; if(i which is mean that every single character which is entered should replace existing character unless the cursor is on the end of the text. This sample code doesn`t work I want. Speaking gennerally I want in my text Box to replace all characters with new entered unless the cursor is on the end of the text. Can anyone help me? -- modified at 9:54 Wednesday 19th April, 2006

    C# help question

  • Editing an XML node in C#
    C conrado7

    Maybe these piece of code will help you: 1) if you want create xml file with C# you can use example: XmlDocument myXml = new XmlDocument(); string xml_text = ""+ ""+ ""+ ""+ ""+ ""+ ""; myXml.LoadXml(xml_text); 2) if you want open xml document use exmaple: XmlDocument myXml = new XmlDocument(); XmlTextReader reader = new XmlTextReader(file_name); myXml.Load(reader); reader.Close(); 3) if you want save you xml document you can use example: XmlTextWriter writer = new XmlTextWriter("output.xml",null); writer.Formatting = Formatting.Indented; dokumentXml.Save(writer); writer.Close(); Best way to learn this is MSDN like http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vborixmlschemadesignerwalkthroughs.asp

    C# csharp xml c++ database com

  • My user control (setting properties with my Properties window)
    C conrado7

    I`ve just written my own user control which is inherited from RichTextBox control. This control has it own property called RegularExpression. private string regularExpression; [Category("Behavior")] [Description("Wyrazenie regularne sprawdzające poprawność danych")] public string RegularExpression { get { return regularExpression; } set { regularExpression = value; } } With this property I set up the regular expression which validates my data in control. My problem is that I want set up this property by clicking my control`s context menu (a new window form with textBox to set up regular expression in it) like in the picture: Click here... After clicking OK button I want to set up RegularExpression property with context in textBox. In main application in not a problem. The problem apprears when I want do this the way I,ve just described... I can`t create reference: private void okButton_Click(object sender, System.EventArgs e) ValidatingEditControl.KKEditControl.regularExpresson = this.regExpTextBox1.Text; } It dispays: "ValidatingEditControl.KKEditControl.regularExpresson is inaccesible due to its protectionlevel". Can anyone help me with this? -- modified at 8:21 Monday 20th March, 2006

    C# help regex question

  • RichTextBox and SendKeys action
    C conrado7

    It`s working :D Thank you very much :) But code e.SuppressKeyPress = true; I turned into e.Handled = true; :) -- modified at 9:50 Friday 17th March, 2006

    C# question

  • Regular Expressions in C#
    C conrado7

    I`ve been wondering about creating my own parser, but in more difficult RE it`s very hard to build it. For e.g. ^(/d{2}-/d{3}){3,}$ Reg Exp... How can my parser read this to show me wich character is invalid? Any ideas?

    C# csharp help question database regex

  • RichTextBox and SendKeys action
    C conrado7

    Does anyone of you can tell why the following code: private void HandleKeyPress(object sender, KeyPressEventArgs e) { char c = e.KeyChar; if(c == (short)Keys.Back) { e.Handled = true; SendKeys.Send("{LEFT}"); return; } } works in common textBox but it doesn`t work in richTextBox? In textBox line e.Handled = true; stops the backspace key action and only action after pressing bakcspace key is move the cursor to left (SendKeys.Send("{LEFT}");). In richTextBox it`s taken double action. e.Handled = true; code doesn`t block backspace key action so: 1) first it deletes character (backspace key do it - it isn`t block) 2) second it moves the cursor to left (like SendKeys.Send("{LEFT}"); code do) Can anyone figure out what`s wrong with it?

    C# question

  • Regular Expressions in C#
    C conrado7

    You sugested that in a more difficult regular expression the better thing to do is to write my own regular expression parser? Do you have any idea how I suppose to do this?

    C# csharp help question database regex

  • Regular Expressions in C#
    C conrado7

    Are you absolutely sure? Anyway...Thank you very much... You let me safe so much time of my research...

    C# csharp help question database regex

  • Regular Expressions in C#
    C conrado7

    Does anyone of you can answer to my question? I want use regular expression in my text box to validate text. For example reg. expression like this : "[0-9][0-9]-[0-9][0-9][0-9]" accepts only for example "43-456" text. What if I enter "54-8f5" ? .NET Regular Expressions tells me that this text is not correct. But it doesn`t tell me which character is invalid. My problem is that I want .NET Regular Expressions show me which character (which character index in this incorrect string) is invalid. Please help me... -- modified at 15:53 Thursday 16th March, 2006 Is it possible with .NET regular expressions?

    C# csharp help question database regex

  • read image
    C conrado7

    You can use this code: private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { Graphisc g = e.Graphisc; Bitmap bmp = new Bitmap("your_image.jpg"); g.DrawImage(bmp, 0, 0); } -- modified at 9:27 Thursday 16th March, 2006

    C# tutorial csharp

  • New window in application
    C conrado7

    Thanks a lot :) I discovered that code: System.Windows.Forms.Form NewFormObject = new MyForm(); is valid too :)

    C# tutorial question

  • New window in application
    C conrado7

    How to invoke from From1 application (it`s the main appliction) to another form (window) with for example cliking the button?

    C# tutorial question

  • SendKeys in C#
    C conrado7

    You asked me why it doesn`t work. It takes two action in the same time. First it deletes charakters (so backspace key works like should work), second it moves cursor to left like I want. In textBox works only second action which exactly I want. In richTextBox work both of them. e.Handled = true; code should make a backspace key action not allowed. Why is that? I need this action in my richTextBox to validate text which I enter to this.

    C# csharp help question

  • SendKeys in C#
    C conrado7

    I want in my RichTextBox this action to do: Backspace key takes the same action like left arrow key. Speaking generally I don`t want to delete characters by backspace key inside the textBox field unless it is the last character. This code works in TextBox (do the action which I want) but unfortunatelly doesn`t work in RichTextBox. private void textBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) { char c = e.KeyChar; int start = textBox1.SelectionStart; int lenght = textBox1.Text.Length; if(c == (short)Keys.Back && start!=lenght) { e.Handled = true; SendKeys.Send("{LEFT}"); return; } } Can anyone help me?

    C# csharp help question

  • "SendKeys" in TextBox and RichTextBox (C#)
    C conrado7

    I want in my RichTextBox this action to do: Backspace key takes the same action like left arrow key. Speaking generally I don`t want to delete characters by backspace key inside the textBox field unless it is the last character. This code works in TextBox (do the action which I want) but unfortunatelly doesn`t work in RichTextBox. private void textBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) { char c = e.KeyChar; int start = textBox1.SelectionStart; int lenght = textBox1.Text.Length; if(c == (short)Keys.Back && start!=lenght) { e.Handled = true; SendKeys.Send("{LEFT}"); return; } } Can anyone help me? Sorry for my english ;)

    .NET (Core and Framework) csharp help question

  • Regular Expressions in .NET (C#)
    C conrado7

    Can anyone help me? I`ve just started my adventure with .NET. I want use regular expression in my text box to validate text. For example reg. expression like this : "[0-9][0-9]-[0-9][0-9][0-9]" accepts only for example "43-456" text. What if I enter "54-8f5" ? .NET Regular Expressions tells me that this text is not correct. But it doesn`t tell me which character is invalid. My problem is that I want .NET Regular Expressions show me which character (which character index in this incorrect string) is invalid. Can anyone help with this? conrados

    C# csharp help database regex tutorial
  • Login

  • Don't have an account? Register

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