Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows 11, running report to printer throws 'invalid clipboard format'

Status
Not open for further replies.

GriffMG

Programmer
Mar 4, 2002
6,288
1
38
FR
I have a VFP9 application, running for years, client is testing windows 11 and when running a report is getting this error

OLE error code 0x8004006a invalid clipboard format

The error is being thrown at this line (based on the number)

Code:
	REPORT FORM MATERIALORDER TO PRINTER NOCONSOLE

There is no clipboard involved, is this something to do with using a BMP image in the report and M$ doing something unexpected with MS Paint?



Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
I can't offer a solution, Griff. But I can say that you are not alone. Others have reported the same problem. For example, see this blog post: Invalid Clipboard Format Error Partially Solved.

As you will see, he tried re-installing the relevant printer drivers, but this only partly solved the problem.

I hope someone can provide a more ocmplete solution.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Has it happened to you yet Mike, or are your clients not moving until W12?

I think I'll advise client to use W10 for time being. I can see this being 1000s of hours work
if I have to mod every report on every app...

I'll see if Paint can be installed.


Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Thinking this might help


Have client trying it now.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Apparently that did not help!

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
This sounds bad. What's known about the error so far?

Does it happen with all reports that include a Picture/OLE with a path to an BMP-File as the Control source?

bmp_error_wka6wu.jpg


Would the error still appear when you change to jpeg images?

Thanks,
Manni
 
There are all kinds of printer issues with Windows 11 - just Google it. Did you really expect there would not be?
 
Just a stupid idea: Mabye if you install mspaint.exe and the accompanying dll files from a 32-bit Windows in the SysWOW64 folder it might help, so VFP can use the 32 bit paint/dlls?

You could check with Syssinternals/TechNet's Process Explorer or Dependency Walker on an older OS like Windows 8.1 (32-bit) what support files are needed to run the 32-bit version of mspaint.exe and include them in the SYSWOW64 plus register them using regsvr32.

Just a thougt? (I have no idea how Paint and vfp work together)
 
The youtube video I linked to above does seem to do most of the install, but perhaps it misses the OLE tweak
needed.

I don't have W11 machine to test it on, but I do (now) have access via RDP to the machine in question so
I can have a play.

I believe the problem is with general fields containing bmp files loaded in an earlier version of windows (95,98,7,Vista,XP - I do
not know) and reports - my guess is that VFP grabs the contents of the general field tries to load it into the clipboard and pastes
it into M$ Paint... but the new version of Paint is called and that does not like the contents of the clipboard.

Maybe I can remove the existing W11 paint before I install the classic one again and work from there... or maybe I'll have to find a way
to convert the BMP files to some other format that works... could be a heck of a lot of work!


Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
I just went through this with a client. In Windows 11, Paint is no longer an automation server and thus, you can't use General fields contain BMPs (that are linked to Paint) in reports.

For my client, there were only a couple of General fields (holding logos), so we changed to store the file paths instead and reworked the relevant forms and reports.

I found code in the first message of thread184-1798243 that I adapted to save the existing General fields out to files. (I knew they were BMPs.)

Tamar

 
Tamar, thank you.

I think that confirms what I've worked out by experiment. Why did M$ do this? Apparently in the beta and dev versions of W11 the old (classic) version
of Paint was still there, so no one said 'this doesn't work'...

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Darn it looks like you get nowt in W11 from a general field, I tried using a different class, but it ignored it. Just get
a logo and a file name.



Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top