Discussion:
Runtime Error '481': Invalid Picture
(too old to reply)
John Mott
2014-05-23 09:10:56 UTC
Permalink
I am running VB5 under Win7 and modifying my old programs to run under
Win7. I have installed VB6 service pack 6 to update MSCOMCTL32.ocx
I am getting this error message from a program which captures the
screen into the clipboard and then prints it with Printer.PaintPicture
Clipboard.
I see a solutions here
http://www.exactsoftware.com/docs/DocView.aspx?DocumentID={79a06bfe-8a9e-475f-9e25-381308bd8f97}
and here
http://www.vbforums.com/showthread.php?609419-RESOLVED-Error-481-Invalid-picture
I am wondering if either or both of these work and whether the first
one is safe to implement.

John
ralph
2014-05-24 03:28:43 UTC
Permalink
Post by John Mott
I am running VB5 under Win7 and modifying my old programs to run under
Win7. I have installed VB6 service pack 6 to update MSCOMCTL32.ocx
I am getting this error message from a program which captures the
screen into the clipboard and then prints it with Printer.PaintPicture
Clipboard.
I see a solutions here
http://www.exactsoftware.com/docs/DocView.aspx?DocumentID={79a06bfe-8a9e-475f-9e25-381308bd8f97}
and here
http://www.vbforums.com/showthread.php?609419-RESOLVED-Error-481-Invalid-picture
I am wondering if either or both of these work and whether the first
one is safe to implement.
The simplest answer is to ask - What do you mean about safe?

This issue - based completely on the assumption that you are
attempting to print in the same context demonstrated by the articles
you have posted - boils down to two fixes:

1) Revert back to an earlier version of a commonly shared component.
or
2) Modify your code to work with a current version of the same
component.

If #1, resolves the problem with *that* app - but what happens when
you install something that brings in an updated component and it
breaks again?
Are you going to reinstall the older component?
Do you plan to always keep your box at that level?

If #2, you resolve the problem with your applications that will allow
them to work with the newer component?
You don't have to worry about what might happen with any new install.
You can keep your box current with the latest 'n greatest.

IMHO the best course of action is to modify your applications
(Solution #2).
[OR migrate to a side-by-side install solution. Research manifests,
etc. But note, side-by-side support for vb common controls has other
issues separate from most, therefore, it may not work for this
particular object anyway. Thus back to solution #2. <g>]

I'm not going to go into the details except to say - You are dealing
with an unsupported development platform that is 15 years out of sync
with the rest of Windows. Even more dysfunctional when you consider
that the *VB Printer Object* is a technology that was essentially
abandoned by serious developers before VB6 appeared.

You may find this of interest, but it is merely the beginining <g>.
http://support.microsoft.com/kb/154078
John Mott
2014-05-25 07:58:43 UTC
Permalink
I did not phrase my question very well.
Your logic is sound and I attempted to solve the problem with
Solution#2.
Unfortuneately I cannot get it to work. The captured screen goes into
the clipboard allright but Printer.PaintPicture still comes up with
error message 481 even with the modified code.
Have gone away to think about it and see if I can find another
solution.
John
Post by ralph
Post by John Mott
I am running VB5 under Win7 and modifying my old programs to run under
Win7. I have installed VB6 service pack 6 to update MSCOMCTL32.ocx
I am getting this error message from a program which captures the
screen into the clipboard and then prints it with Printer.PaintPicture
Clipboard.
I see a solutions here
http://www.exactsoftware.com/docs/DocView.aspx?DocumentID={79a06bfe-8a9e-475f-9e25-381308bd8f97}
and here
http://www.vbforums.com/showthread.php?609419-RESOLVED-Error-481-Invalid-picture
I am wondering if either or both of these work and whether the first
one is safe to implement.
The simplest answer is to ask - What do you mean about safe?
This issue - based completely on the assumption that you are
attempting to print in the same context demonstrated by the articles
1) Revert back to an earlier version of a commonly shared component.
or
2) Modify your code to work with a current version of the same
component.
If #1, resolves the problem with *that* app - but what happens when
you install something that brings in an updated component and it
breaks again?
Are you going to reinstall the older component?
Do you plan to always keep your box at that level?
If #2, you resolve the problem with your applications that will allow
them to work with the newer component?
You don't have to worry about what might happen with any new install.
You can keep your box current with the latest 'n greatest.
IMHO the best course of action is to modify your applications
(Solution #2).
[OR migrate to a side-by-side install solution. Research manifests,
etc. But note, side-by-side support for vb common controls has other
issues separate from most, therefore, it may not work for this
particular object anyway. Thus back to solution #2. <g>]
I'm not going to go into the details except to say - You are dealing
with an unsupported development platform that is 15 years out of sync
with the rest of Windows. Even more dysfunctional when you consider
that the *VB Printer Object* is a technology that was essentially
abandoned by serious developers before VB6 appeared.
You may find this of interest, but it is merely the beginining <g>.
http://support.microsoft.com/kb/154078
Loading...