Search found 15 matches

by aartogba
Fri Sep 28, 2018 9:59 am
Forum: PowerShell GUIs
Topic: The xml was improperly formatted.
Replies: 12
Views: 3503

Re: The xml was improperly formatted.

Ok, but is there a workaround to detect if the backspace key has been pressed?
by aartogba
Fri Sep 28, 2018 8:12 am
Forum: PowerShell GUIs
Topic: The xml was improperly formatted.
Replies: 12
Views: 3503

Re: The xml was improperly formatted.

Ok thanks for confirming that it's just a simple bug I can ignore.
by aartogba
Fri Sep 28, 2018 7:22 am
Forum: PowerShell GUIs
Topic: The xml was improperly formatted.
Replies: 12
Views: 3503

Re: The xml was improperly formatted.

See the attachment.

Thanks
by aartogba
Fri Sep 28, 2018 7:14 am
Forum: PowerShell GUIs
Topic: The xml was improperly formatted.
Replies: 12
Views: 3503

Re: The xml was improperly formatted.

I don't use any XML in this script.

The message appears when I hover the mouse over the $_ variable. There is no value in the watch panel when I type $_.KeyChar.
by aartogba
Fri Sep 28, 2018 5:35 am
Forum: PowerShell GUIs
Topic: The xml was improperly formatted.
Replies: 12
Views: 3503

The xml was improperly formatted.

Hi everyone,

I have a Windows form with a textbox in it. When I use debugger on KeyPress Event after pressing backspace key and look for the $_.KeyChar property, it shows me "The XML was improperly formatted. Please escape if it necessary". What's going on here?
by aartogba
Fri Sep 28, 2018 5:22 am
Forum: PowerShell GUIs
Topic: Textbox cursor position is reset after programmatically changed text property
Replies: 15
Views: 5250

Re: Textbox cursor position is reset after programmatically changed text property

I finally make it work with both KeyPress and TextChanged Event! Thank you for your precious help.
by aartogba
Wed Sep 26, 2018 10:11 am
Forum: PowerShell GUIs
Topic: Textbox cursor position is reset after programmatically changed text property
Replies: 15
Views: 5250

Re: Textbox cursor position is reset after programmatically changed text property

Well, I still want to send the chars to the textbox. Problem is that the Text property of the textbox isn't updated when I look at it in the KeyPress EventHandler. I just want to look at the first char in the textbox. If it's lower case then replacing it by the corresponding capital letter. The same...
by aartogba
Wed Sep 26, 2018 9:06 am
Forum: PowerShell GUIs
Topic: Textbox cursor position is reset after programmatically changed text property
Replies: 15
Views: 5250

Re: Textbox cursor position is reset after programmatically changed text property

Hi, Thank you all for your answers. I've used KeyPress event but now I'm facing another problem. When KeyPress event is triggered, it fires a validation function that looks for characters in the textbox that is updated, but the Text property is now empty. I think it relates to the fact that the Text...
by aartogba
Fri Sep 21, 2018 2:09 pm
Forum: PowerShell GUIs
Topic: Textbox cursor position is reset after programmatically changed text property
Replies: 15
Views: 5250

Re: Textbox cursor position is reset after programmatically changed text property

Ok so can you give me a simple example of using keystroke so I can figure it out in my own application?
by aartogba
Fri Sep 21, 2018 12:28 pm
Forum: PowerShell GUIs
Topic: Textbox cursor position is reset after programmatically changed text property
Replies: 15
Views: 5250

Re: Textbox cursor position is reset after programmatically changed text property

This is the way I did it before using TextChanged event but the only way to fire the Validated event was to get out of the control and I did't want that behavior unless I missed something there? I just wanted to validate textboxes as soon as something has changed and immediately fill other textboxes.