Copy paste and cut paste
Hi,
Now I am working on windows applications,
I have written some logic to accept required specialcharacters and alphabets and digits in keypress events.Its working while I am trying to enter the data in my text box but my requirement foail for copy paste or cut paste to textbox.
I have tride to solve this problem in keydown event but I unable to get result.
and for example :Ctrl+V
I put break point at this event procedure(keydown) and I press "Ctrl" key then immediatly this event has fired before I press "V" key so can you tel me how to resolve my problem.
raja rameshPosted Sep 15, 2011, 7:06 AM
Can you any one tel me answer for my above requirement!!!!!!!!
And another requirement
2)In my form I have two buttons one is Save button and another one is Clear button.
First time when I click Save button validations are working perfectly and
I have written CausesValidation =false for my Clear button So once I click Clear button after I try to click to Save button all validations are not working properly, Because I think I have written CausesValidation=false for my Clear button. so how to cnange CausesValidation=true for all controls in the Form before I click save button.
raja rameshPosted Sep 13, 2011, 8:21 AM
Hi mahesh in your article you have written in button click event but where I have to write code for paste data using Ctrl+V and paste data by using mouse. I have written in keypress event in following way
private void RadMaskedEditBoxForRegex_KeyPress(object sender, KeyPressEventArgs e) {
Regex regex = new Regex((sender as RadMaskedEditBoxElement).Mask);
if (!regex.IsMatch(e.KeyChar.ToString())) {
e.Handled = true; return;
}
}
But its not working for copy paste.
Mahesh ChandPosted Sep 11, 2011, 10:40 AM
Working with System Clipboard
Prabhu RajaPosted Sep 11, 2011, 9:31 AM