|
|
#1 |
|
Member
Join Date: Jan 07
Posts: 50
![]() |
Hail to All,
Ok here is the problem I am having. Clipboard.Clear it not clearing the clipboard on all machines my program is run on. Most machines it works fine. Other still have what was previously copied. Here is a test I run. one button has Clipboard.Clear Clipboard.SetText "This is a test" the other button has Clipboard.Clear Clipboard.SetText "This is the second test" Now they go to a blank document of some type notepad word or an e-mail program and hit ctrl-V and it pastes what was previously in the cipboard even though I cleared it. Now if they go to a program like word and manual clear the clipboard they can click button one and it pastes 'This is a test' they then click the second button and it pastes the same text that is in the first button because the clipboard for some reason is not cleared. So, they are having to manually clear the clipboard each time. Anyone have any ideas? Thanks for all your help. Mythos |
|
|
|
|
|
#2 | |
|
Super Moderator
Join Date: Aug 01
Location: Sterling Heights, Michigan
Posts: 52,309
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: Pls Help Clipboard.Clear Not clearing the clipboard
Quote:
Lets start with the machines. Does this behavior consistently happen on the machines it is not clearing on? I.E., does it never, ever clear, or, even on these machines, does it clear sometimes? What are the differences in the machines that it works on and those that it does not work on? Brand Names? OS version? Service Pack Level? Do the machines that it does not clear on run software that the others do not?
__________________
Please use [Code]your code goes in here[/Code] tags when posting code. When you have received an answer to your question, please mark it as resolved using the Thread Tools menu. Before posting your question, did you look here? Got a question on Linux? Visit our Linux sister site. I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum. ![]() Creating A Wizard In VB.NET Modifications Required For VB6 Apps To Work On Vista Paging A Recordset What is wrong with using On Error Resume Next IT professionals freelancer site. Register today to find coders, or offer your services for available freelance projects! Microsoft MVP 2005/2006/2007/2008/2009 |
|
|
|
|
|
|
#3 |
|
Member
Join Date: Jan 07
Posts: 50
![]() |
they are all suposed to be identical machines with identical software. I did find an instance if they had a program called printkey2000 open it couldn't clear the clipboard so we can get around that. Though I thought it should clear the clipboard no matter what seeing as that is what the code is suposed to do. is there any other way to force the clipboard to clear seeing as MS Word is able to do this.
Thanks again, Mythos |
|
|
|
|
|
#4 |
|
Super Moderator
Join Date: Aug 01
Location: Sterling Heights, Michigan
Posts: 52,309
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: Pls Help Clipboard.Clear Not clearing the clipboard
MS Word is not written in Visual Basic.
Clipboard.Clear is the only VB way I'm familiar with.
__________________
Please use [Code]your code goes in here[/Code] tags when posting code. When you have received an answer to your question, please mark it as resolved using the Thread Tools menu. Before posting your question, did you look here? Got a question on Linux? Visit our Linux sister site. I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum. ![]() Creating A Wizard In VB.NET Modifications Required For VB6 Apps To Work On Vista Paging A Recordset What is wrong with using On Error Resume Next IT professionals freelancer site. Register today to find coders, or offer your services for available freelance projects! Microsoft MVP 2005/2006/2007/2008/2009 |
|
|
|
|
|
#5 |
|
Super Moderator
Join Date: Aug 01
Location: Sterling Heights, Michigan
Posts: 52,309
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: Pls Help Clipboard.Clear Not clearing the clipboard
Just for giggles, I just tried this and it seemed to work (but, Clipboard.Clear also works without any problems for me and on all of the machines on which I have apps deployed)
Give it shot and see what happens. Code:
Clipboard.Clear Clipboard.SetText vbNullString
__________________
Please use [Code]your code goes in here[/Code] tags when posting code. When you have received an answer to your question, please mark it as resolved using the Thread Tools menu. Before posting your question, did you look here? Got a question on Linux? Visit our Linux sister site. I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum. ![]() Creating A Wizard In VB.NET Modifications Required For VB6 Apps To Work On Vista Paging A Recordset What is wrong with using On Error Resume Next IT professionals freelancer site. Register today to find coders, or offer your services for available freelance projects! Microsoft MVP 2005/2006/2007/2008/2009 |
|
|
|
|
|
#6 |
|
Member
Join Date: Jan 07
Posts: 50
![]() |
Ok this does still does not clear the clipboard though the string is now added and when they hit ctrl-v it adds the latest string. So it's not 100% but it will do. Thanks so much for your help. It is greatly appreciated.
Mythos |
|
|
|
|
|
#7 |
|
Super Moderator
Join Date: Aug 01
Location: Sterling Heights, Michigan
Posts: 52,309
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: Pls Help Clipboard.Clear Not clearing the clipboard
You should continue your investigation in an attempt to find out what is going on with those few machines.
If you do find the issue, post back what it was and what you did.
__________________
Please use [Code]your code goes in here[/Code] tags when posting code. When you have received an answer to your question, please mark it as resolved using the Thread Tools menu. Before posting your question, did you look here? Got a question on Linux? Visit our Linux sister site. I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum. ![]() Creating A Wizard In VB.NET Modifications Required For VB6 Apps To Work On Vista Paging A Recordset What is wrong with using On Error Resume Next IT professionals freelancer site. Register today to find coders, or offer your services for available freelance projects! Microsoft MVP 2005/2006/2007/2008/2009 |
|
|
|
|
|
#8 |
|
PowerPoster
Join Date: Feb 06
Location: East of NYC, USA
Posts: 5,692
![]() ![]() ![]() ![]() |
Re: Pls Help Clipboard.Clear Not clearing the clipboard
The computers it's not working on aren't running a Clipboard manager of any sort, are they?
__________________
The most difficult part of developing a program is understanding the problem. The second most difficult part is deciding how you're going to solve the problem. Actually writing the program (translating your solution into some computer language) is the easiest part. Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read. Please Help Us To Save Ana |
|
|
|
|
|
#9 |
|
Super Moderator
Join Date: Aug 01
Location: Sterling Heights, Michigan
Posts: 52,309
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Re: Pls Help Clipboard.Clear Not clearing the clipboard
Like what, for instance? (I'm not familiar with Clipboard managers.)
__________________
Please use [Code]your code goes in here[/Code] tags when posting code. When you have received an answer to your question, please mark it as resolved using the Thread Tools menu. Before posting your question, did you look here? Got a question on Linux? Visit our Linux sister site. I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum. ![]() Creating A Wizard In VB.NET Modifications Required For VB6 Apps To Work On Vista Paging A Recordset What is wrong with using On Error Resume Next IT professionals freelancer site. Register today to find coders, or offer your services for available freelance projects! Microsoft MVP 2005/2006/2007/2008/2009 |
|
|
|
|
|
#10 |
|
PoorPoster
Join Date: Oct 05
Location: in an island
Posts: 2,654
![]() ![]() ![]() ![]() ![]() |
Re: Pls Help Clipboard.Clear Not clearing the clipboard
Like MS-Office clipboard manager (multiple copy/paste history) but works with windows clipboard.
|
|
|
|
|
|
#11 |
|
Junior Member
Join Date: Apr 07
Posts: 17
![]() |
Re: Pls Help Clipboard.Clear Not clearing the clipboard
Ive had a similar problem where we would clear the clipboard, but it would still error out saying its full if the next line attempted to add to it. DoEvents after the clear took care of it, may be worth a try.
|
|
|
|
![]() |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|