Transparent background of pictures or images on forms

N

Nando

How do I get my picture or image to use a transparent background after I
insert them into forms?

I have been using transparent Gif files and even Bmp images with 256 or 16
colors. But depending on the resolution/colors of my computer display, it
may not show as the standard buttonface (system color -#) of forms.

Did the Microsoft development team miss this or is there anyway I can
accomplish this so basic task?

I'm using Access 2002 (XP)
 
N

Nando

Thanks a lot Allen!

I have been playing with it. It works! Unfortunately it has a big bug. The
background of the image needs to be white; which is not a big issue until
you use an image that has some portions of white inside. The result is an
image with transparent background and some other portions also transparent.
A very distorted .EMF image.

That's why I always I prefer to use the light-green color as the background.
However, Leban's solution does not have a way to specify the color to set as
transparent. It is forcing it to be white.

It is only missing that. I wish I could modify this (perhaps I countinue to
be lucky and Lebans or anyone who has played with this can fix it).
 
N

Nando

Also, another issue I found dealing with these enhanced metafiles (.EMF) is
that Access XP distorts the geometry of the picture. A picture of a
triangle, for example, will not display their 3 sides as flat, but rather
bumpy within Access. In Microsoft Word or Windows XP Viewer this looks
perfectly fine. (Yes!, I made sure the size mode of the image is set to Clip
and not Stretch/Zoom).

What was the Access development team thinking? Why is it impossible to deal
with graphics under Access? I'm so disappointed.
 
A

Allen Browne

Sorry: I don't have a solution for the background color or pixelation issues
for Stephen's control.
 
S

Stephen Lebans

Nando I have worked with hundreds of EMF's under Access 2003 and have not
seen the distortion your are referring to. Can you Email me the EMF and the
orginal JPB/BMP/Whatever so I can see the issue myself?
(e-mail address removed)


--

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

Stephen Lebans

Nando it is not a bug or as you state, a "big bug".

As I clearly explain on the Transparent Web page, any/all transparent areas
have to be White. The majority of Paint programs that support specifiying a
transparent color require that all pixels of the selected color will be
transparent. How could it be any other way? I did not include a GUI to allow
you to manually specify specific pixels will be transparent. It's all or
nothing.

If you are not satisified with the results then follow one of the manual
methods, as detailed on the Transparent Web page, using MS Word and an
Unbound OLE control, to create a transparent Image.

Good luck with your project.


--

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

Nando

Thanks Stephen!

Unfortunately, for some strange reason, the Microsoft Word trick does not
work for me. I have been doing some research online and found that the MS
Word trick does work for many people. I'll have to wait on you so you can
finish your program so users can specify which color to set transparent :(

I tried to follow the API code, but got lost and find myself unable to make
changes to it. It will be great if you could at least add a button for users
to indicate a second file that contains the mask for the picture (I actually
wouldn't mind that extra step with MSPaint).

I have been looking for some EMF editors, but couldn't find any. You and
Allen have been most helpful! Thanks!
 
N

Nando

Thanks Stephen! I'm using Access XP (2002). I also tried under Access 97.
The same. The size of the image (EMF) looks slighter larger, and the shape
of the picture is very crucket and bumpy. I sent you the files. Hopefully
you will be able to reproduce the same results on your end. Thanks for your
assistance.

"Stephen Lebans" wrote :
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top