Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"API: Put an image in Access window" doesn't work in Access 2000/2002

3 views
Skip to first unread message

Sven Stening

unread,
Nov 4, 2002, 2:07:32 PM11/4/02
to
Hello,

the code published by Dev Ashish "API: Put an image in Access window"
(http://www.mvps.org/access/api/api0035.htm) doesn't work in Access 2000 or
2002. It works fine in Access 97, and even in 2000 and 2002 when they are
installed on the same PC.

But in an installation without Access 97 nothing happens to the background
at all.

Do i make anything wrong? Do anyone else know the problem or even a
solution?

Thanks, Sven

P.S.: I want to thank Dev Ashish for his wonderful Access Web. It helped me
a lot of times and is really a great site!


Dev Ashish

unread,
Nov 4, 2002, 2:33:29 PM11/4/02
to

"Sven Stening" <sven.s...@pssp-online.de> wrote in message
news:aq6gbk$9q8$07$1...@news.t-online.com...

> Hello,
>
> the code published by Dev Ashish "API: Put an image in Access window"
> (http://www.mvps.org/access/api/api0035.htm) doesn't work in Access 2000
or
> 2002. It works fine in Access 97, and even in 2000 and 2002 when they are
> installed on the same PC.
>
> But in an installation without Access 97 nothing happens to the background
> at all.

There are a couple of things for you to make sure of in Access 2000 and
2002. I just tested these changes and they seemed to work fine.

a) Make sure you use the built-in 'AddressOf' under Access 2000 and 2002
instead of AddrOf ( CMDIWindow.Hook procedure).

b) For Access 2002, go to the CMDIWindow class, and the 'Hook' procedure.
Change the Access 2000 version check to read:

If mintAccessVer >= 9 Then ' Access 2000 ONLY

-- Dev


Sven Stening

unread,
Nov 4, 2002, 3:16:31 PM11/4/02
to
Hi Dev,

thanks for your quick answer!

Yes, i made sure that
a) i am using the built-in 'AddressOf' under Access 2000 and 2002

and no, i made not sure that
b) the version check is >=9 (only =9). (Sometimes, I'm such an id...!)

Now it works under Access 2002! Why it didn't work under Access 2000 I'm not
sure, because =9 should have been right. I will test it again and look if
there is any other problem. Maybe it's important that i am using the german
access version. But usualy it doesn't matter which language version i use.

Thanks for your help, i hope the "Access Web" lives long and prosper,
Sven


"Dev Ashish" <d...@mvps.org> schrieb im Newsbeitrag
news:aq6i34$72b2p$1...@ID-14345.news.dfncis.de...

Terry Kreft

unread,
Nov 5, 2002, 8:49:36 AM11/5/02
to
Sven,
I had someone asking me privately about this very thing not so long ago.

After a lot of attempts using the code from Devs site, some code I wrote
ages ago and trying lots of other API calls etc. I came to the conclusion
that it just doesn't work reliably in A2000.

The main problem is that it can hang at the point where you first subclass
the window, pressing ctl-break to pause execution and then F5 to continue
then makes it work, but this is of course useless for a deployed
application.

So in summary; as you've found up to now A97 and A2002 are fine and work
well, A2000 does not.


--
Terry Kreft
Access MVP
terry...@mps.co.uk
***********************************************
If it's not plain text, without attachments,
I'm not reading it.
***********************************************


"Sven Stening" <sven.s...@pssp-online.de> wrote in message

news:aq6kd4$9nc$01$1...@news.t-online.com...

Stephen Lebans

unread,
Nov 5, 2002, 11:04:51 AM11/5/02
to
Terry isn't the behaviour your seeing due to the subclassing bug in A2K
due to the VB IDE? I reported it way back to MS and they acknowledged
it. I didn't think it was fixed in A2K2.
The code should work if:
1) You never open the IDE at any time during the current session.
2) You complile to MDE which is the same effect as #1

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


"Terry Kreft" <terry...@mps.co.uk> wrote in message
news:3dc7...@papir.kiev.ua...

Dev Ashish

unread,
Nov 6, 2002, 7:57:28 AM11/6/02
to

"Stephen Lebans" <Stephe...@mvps.org> wrote in message
news:D_Rx9.2156$wy.2...@ursa-nb00s0.nbnet.nb.ca...

> Terry isn't the behaviour your seeing due to the subclassing bug in A2K
> due to the VB IDE? I reported it way back to MS and they acknowledged
> it. I didn't think it was fixed in A2K2.
> The code should work if:
> 1) You never open the IDE at any time during the current session.
> 2) You complile to MDE which is the same effect as #1


FWIW, I think the same applies to A02, although mostly in the case where the
form is subclassed. I did encounter this for MDIClient, and if I can
reproduce it, I'll doc it in the article.

-- Dev


Terry Kreft

unread,
Nov 7, 2002, 4:55:30 AM11/7/02
to
I'll reply in here as I didn't see Stephens post

Stephen,
It looks as though you are right, if I don't open the IDE it doesn't hang, I
didn't compile to MDE as
a) It's probably moot as you can't get to the code window
b) I trust you to be right anyway.


Dev,
I did an awful lot of testing and couldn't get it to fail on A2002, but
having said that I was concentrating on trying to get it to work in A2000.

--
Terry Kreft
Access MVP
terry...@mps.co.uk
***********************************************
If it's not plain text, without attachments,
I'm not reading it.
***********************************************


"Dev Ashish" <d...@mvps.org> wrote in message
news:aqb3kg$7l2kr$1...@ID-14345.news.dfncis.de...

Dev Ashish

unread,
Nov 8, 2002, 10:19:26 AM11/8/02
to
Terry,

"Terry Kreft" <terry...@mps.co.uk> wrote in message

news:3dca...@papir.kiev.ua...


> I'll reply in here as I didn't see Stephens post
>
> Stephen,
> It looks as though you are right, if I don't open the IDE it doesn't hang,
I
> didn't compile to MDE as

That what I found as well. It's the one-time display of the IDE that's the
problem, but I'm wondering (yet to test it), if forcing the VBE to close
would make the code work...

[ http://www.mvps.org/access/api/api0063.htm ]

> I did an awful lot of testing and couldn't get it to fail on A2002, but
> having said that I was concentrating on trying to get it to work in A2000.

I had problems under A2002 with the VBE, but only in the case when the form
was subclassed for WM_MOUSEMOVE (in systray); yet to resolve this out.

--
Dev Ashish
Access MVP
http://www.mvps.org/access; http://www.mvps.org/accessfr


0 new messages