Data Danger
Freshman
- Joined
- Mar 25, 2004
- Messages
- 29
Hi All
I keep getting the Requested Clipboard Operation did not succeed error when trying to clear the clipboard. I found it to be related to a textbox that has the multiline set to true.
Example :
I created a new form entered 2 textboxes . The first multiline = false and the second multiline = true. I also create a module. In the module I created the following methods.
In the textboxes_TextChanged I put
My main program has other code that's not relevant here but its purpose was to check data being pasted into the program through the clipboard and it is checking for certain characters that are not valid. If any bad data found then clear the clipboard.
So I then open up Notepad, keyed in some text , copied it and pasted into the first text and no error. I then pasted the same text into the second textbox and the error accurs.
Anybody know of why this might be?
I'm using XP Pro sp2, VS 2005 .NET 2.0
Regards
-Paul
I keep getting the Requested Clipboard Operation did not succeed error when trying to clear the clipboard. I found it to be related to a textbox that has the multiline set to true.
Example :
I created a new form entered 2 textboxes . The first multiline = false and the second multiline = true. I also create a module. In the module I created the following methods.
Visual Basic:
Public Function fnVerifyFile() As Boolean
fnClearClipBoard()
End Function
Public Function fnClearClipBoard() As Boolean
Try
Clipboard.Clear()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Visual Basic:
Try
fnVerifyFile()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
So I then open up Notepad, keyed in some text , copied it and pasted into the first text and no error. I then pasted the same text into the second textbox and the error accurs.
Anybody know of why this might be?
I'm using XP Pro sp2, VS 2005 .NET 2.0
Regards
-Paul
Last edited by a moderator: