To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
Part 10 of the Visual Basic .NET 2010 Express Tutorial Complete!
How to Use the Visual Studio Code Analysis Tool FxCop
Article :: Interview with Andrei Alexandrescu (Part 3 of 3)
Introducing Visual Studio LightSwitch
Visual Studio LightSwitch Beta 1 is Available



Go Back   VBForums > Visual Basic > Visual Basic 6 and Earlier

Reply Post New Thread
 
Thread Tools Display Modes
Old May 30th, 2007, 12:13 PM   #1
Mythos44
Member
 
Join Date: Jan 07
Posts: 60
Mythos44 is an unknown quantity at this point (<10)
Question Pls Help Clipboard.Clear Not clearing the clipboard

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
Mythos44 is offline   Reply With Quote
Old May 30th, 2007, 12:16 PM   #2
Hack
Super Moderator
 
Hack's Avatar
 
Join Date: Aug 01
Location: Sterling Heights, Michigan
Posts: 54,243
Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)
Re: Pls Help Clipboard.Clear Not clearing the clipboard

Quote:
Originally Posted by Mythos44
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.
There is seldom a clear cut answer to problems like these.

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
Good Article: Language Enhancements In Visual Basic 2010
IT professionals freelancer site. Register today to find coders, or offer your services for available freelance projects!
Upgrading VB6 Code To VB.NET
Microsoft MVP 2005/2006/2007/2008/2009/2010
Hack is offline   Reply With Quote
Old May 30th, 2007, 12:24 PM   #3
Mythos44
Member
 
Join Date: Jan 07
Posts: 60
Mythos44 is an unknown quantity at this point (<10)
Question Re: Pls Help Clipboard.Clear Not clearing the clipboard

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
Mythos44 is offline   Reply With Quote
Old May 30th, 2007, 12:27 PM   #4
Hack
Super Moderator
 
Hack's Avatar
 
Join Date: Aug 01
Location: Sterling Heights, Michigan
Posts: 54,243
Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)
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
Good Article: Language Enhancements In Visual Basic 2010
IT professionals freelancer site. Register today to find coders, or offer your services for available freelance projects!
Upgrading VB6 Code To VB.NET
Microsoft MVP 2005/2006/2007/2008/2009/2010
Hack is offline   Reply With Quote
Old May 30th, 2007, 12:30 PM   #5
Hack
Super Moderator
 
Hack's Avatar
 
Join Date: Aug 01
Location: Sterling Heights, Michigan
Posts: 54,243
Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)
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
Good Article: Language Enhancements In Visual Basic 2010
IT professionals freelancer site. Register today to find coders, or offer your services for available freelance projects!
Upgrading VB6 Code To VB.NET
Microsoft MVP 2005/2006/2007/2008/2009/2010
Hack is offline   Reply With Quote
Old May 30th, 2007, 01:23 PM   #6
Mythos44
Member
 
Join Date: Jan 07
Posts: 60
Mythos44 is an unknown quantity at this point (<10)
Smile Re: Pls Help Clipboard.Clear Not clearing the clipboard

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
Mythos44 is offline   Reply With Quote
Old May 30th, 2007, 01:43 PM   #7
Hack
Super Moderator
 
Hack's Avatar
 
Join Date: Aug 01
Location: Sterling Heights, Michigan
Posts: 54,243
Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)
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
Good Article: Language Enhancements In Visual Basic 2010
IT professionals freelancer site. Register today to find coders, or offer your services for available freelance projects!
Upgrading VB6 Code To VB.NET
Microsoft MVP 2005/2006/2007/2008/2009/2010
Hack is offline   Reply With Quote
Old May 30th, 2007, 01:46 PM   #8
Al42
PowerPoster
 
Join Date: Feb 06
Location: East of NYC, USA
Posts: 5,692
Al42 is a jewel in the rough (300+)Al42 is a jewel in the rough (300+)Al42 is a jewel in the rough (300+)Al42 is a jewel in the rough (300+)
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
Al42 is offline   Reply With Quote
Old May 30th, 2007, 01:46 PM   #9
Hack
Super Moderator
 
Hack's Avatar
 
Join Date: Aug 01
Location: Sterling Heights, Michigan
Posts: 54,243
Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)
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
Good Article: Language Enhancements In Visual Basic 2010
IT professionals freelancer site. Register today to find coders, or offer your services for available freelance projects!
Upgrading VB6 Code To VB.NET
Microsoft MVP 2005/2006/2007/2008/2009/2010
Hack is offline   Reply With Quote
Old May 30th, 2007, 04:01 PM   #10
iPrank
PoorPoster
 
iPrank's Avatar
 
Join Date: Oct 05
Location: in an island
Posts: 2,658
iPrank is a glorious beacon of light (400+)iPrank is a glorious beacon of light (400+)iPrank is a glorious beacon of light (400+)iPrank is a glorious beacon of light (400+)iPrank is a glorious beacon of light (400+)
Re: Pls Help Clipboard.Clear Not clearing the clipboard

Like MS-Office clipboard manager (multiple copy/paste history) but works with windows clipboard.
__________________
Usefull VBF Threads/Posts I Found . My flickr page .
"I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner

iPrank is offline   Reply With Quote
Old May 30th, 2007, 05:36 PM   #11
LukeD4567
Junior Member
 
Join Date: Apr 07
Posts: 17
LukeD4567 is an unknown quantity at this point (<10)
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.
LukeD4567 is offline   Reply With Quote
Reply

Go Back   VBForums > Visual Basic > Visual Basic 6 and Earlier


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:33 AM.





Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.