[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.vb.general.discussion

Error 481 Invalid picture

F*CK

9/1/2010 11:42:00 AM

Hi,

I have Win XP, when I run my application using right click > run as > check
'protect my computer and data from unauthorized program activity' I get an
error

Run-time error '481': Invalid picture

Why this is happening? and any fixes for that?


Thanks in advance
ab


31 Answers

Kevin Provance

9/1/2010 12:34:00 PM

0


"Abhishek" <user@server.com> wrote in message
news:i5le5i$h41$1@speranza.aioe.org...
: Hi,
:
: I have Win XP, when I run my application using right click > run as >
check
: 'protect my computer and data from unauthorized program activity' I get an
: error
:
: Run-time error '481': Invalid picture
:
: Why this is happening? and any fixes for that?

This usually happens when an image is higher than 32 bit colours (I think,
it's ben awhile, but the problem has been documented here before). If the
action you have coded in the checkbox deals with showing an image or icon,
then chances are the image is in fact not recognized by VB. If you Google
the error with terms like VB and picutre or icon, the solution is out there.
I forget what it is off the top of my head.

F*CK

9/1/2010 12:46:00 PM

0

I just tested it further. I dont think its about 32-bit color images, if I
assign the form an icon from the properties it gives errors, no matter how
many colors are there in the image. even 16 color icons gives the same
error.


Dee Earley

9/2/2010 10:29:00 AM

0

On 01/09/2010 12:41, Abhishek wrote:
> Hi,
>
> I have Win XP, when I run my application using right click> run as> check
> 'protect my computer and data from unauthorized program activity' I get an
> error
>
> Run-time error '481': Invalid picture
>
> Why this is happening? and any fixes for that?

Standard debugging and error handling practices apply to try and find
out what it is loading.
http://hashvb.earlsoft.co.uk...

I don't know what that option does (I have no access to XP) but it
sounds like a limited user/sandbox environment.

--
Dee Earley (dee.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)

F*CK

9/2/2010 11:39:00 AM

0

error handling wont work since the error is not happening at some procedure.
even if you set any icon to form it produces this error when ran, seems like
a bug.

"Dee Earley" <dee.earley@icode.co.uk> wrote in message
news:%23GX%23CpoSLHA.3580@TK2MSFTNGP06.phx.gbl...
| On 01/09/2010 12:41, Abhishek wrote:
| > Hi,
| >
| > I have Win XP, when I run my application using right click> run as>
check
| > 'protect my computer and data from unauthorized program activity' I get
an
| > error
| >
| > Run-time error '481': Invalid picture
| >
| > Why this is happening? and any fixes for that?
|
| Standard debugging and error handling practices apply to try and find
| out what it is loading.
| http://hashvb.earlsoft.co.uk...
|
| I don't know what that option does (I have no access to XP) but it
| sounds like a limited user/sandbox environment.
|
| --
| Dee Earley (dee.earley@icode.co.uk)
| i-Catcher Development Team
|
| iCode Systems
|
| (Replies direct to my email address will be ignored.
| Please reply to the group.)


Mike Williams

9/2/2010 12:52:00 PM

0

"Abhishek" <user@server.com> wrote in message
news:i5o2bq$i0l$1@speranza.aioe.org...

> even if you set any icon to form it produces this
> error when ran, seems like a bug.

It's weird, that. I've just created a completely empty VB project on my XP
laptop (just one Form, no code at all, and set the Form's Icon property to
an .ico file) and the compiled exe (both native and pcode) bombs out with an
Invalid picture error when I right click the exe and select "Run As" with a
tick in "Protect my Computer", before it even shows the Form. There is of
course a warning against that option to the effect that using it might
result in some programs not working but (unless I'm mistaken) I do seem to
recall doing that before with a VB6 exe and I seem to recall it working
okay. I could be wrong on that one though. I'm wondering if it is a Service
Pack issue or something (I'm using SP6B, which I believe tightened up a
security issue with the original SP6)?

Mike


NeilH

9/2/2010 1:01:00 PM

0


"Mike Williams" <Mike@WhiskyAndCoke.com> wrote in message
news:i5o6ld$oi9$1@speranza.aioe.org...
> "Abhishek" <user@server.com> wrote in message
> news:i5o2bq$i0l$1@speranza.aioe.org...
>
> > even if you set any icon to form it produces this
> > error when ran, seems like a bug.
>
> It's weird, that. I've just created a completely empty VB project on my XP
> laptop (just one Form, no code at all, and set the Form's Icon property to
> an .ico file) and the compiled exe (both native and pcode) bombs out with
an
> Invalid picture error when I right click the exe and select "Run As" with
a
> tick in "Protect my Computer", before it even shows the Form. There is of
> course a warning against that option to the effect that using it might
> result in some programs not working but (unless I'm mistaken) I do seem to
> recall doing that before with a VB6 exe and I seem to recall it working
> okay. I could be wrong on that one though. I'm wondering if it is a
Service
> Pack issue or something (I'm using SP6B, which I believe tightened up a
> security issue with the original SP6)?
>
> Mike
>
>

Could the .ico file you are loading be causing the problem? How about trying
again but without the .ico file?

Neil..


F*CK

9/2/2010 1:39:00 PM

0

No, happens with any icon file.


"NeilH" <neil@no-spam.co.uk> wrote in message
news:e94yu7pSLHA.5572@TK2MSFTNGP02.phx.gbl...
|
| Could the .ico file you are loading be causing the problem? How about
trying
| again but without the .ico file?
|
| Neil..
|
|


F*CK

9/2/2010 1:42:00 PM

0

are there two versions of SP6 releases?

"Mike Williams" <Mike@WhiskyAndCoke.com> wrote in message
news:i5o6ld$oi9$1@speranza.aioe.org...

| okay. I could be wrong on that one though. I'm wondering if it is a
Service
| Pack issue or something (I'm using SP6B, which I believe tightened up a
| security issue with the original SP6)?
|
| Mike
|
|


Dee Earley

9/2/2010 1:47:00 PM

0

On 02/09/2010 14:41, Abhishek wrote:
> are there two versions of SP6 releases?

SP6 and SP6 for VB only (iirc)

--
Dee Earley (dee.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)

Dee Earley

9/2/2010 1:47:00 PM

0

On 01/09/2010 12:41, Abhishek wrote:
> Hi,
>
> I have Win XP, when I run my application using right click> run as> check
> 'protect my computer and data from unauthorized program activity' I get an
> error
>
> Run-time error '481': Invalid picture
>
> Why this is happening? and any fixes for that?

Where are you running this from?
Apparently that option also restricts access to the user profile
including My documents.
If the EXE is in there, it will load, try and access its own data in the
executable and fail as it can't be found.

Does it then work if you try and run it from a shared/common location?

--
Dee Earley (dee.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)