HELP: Semi-transparent or Translucent object on a form

E

Eric Bracke

I would like to add a Semi-transparent box on an access form (Access XP on
WindowsXP)
I found some api functions like
SetLayeredWindowAttributes and AlphaBlend, but don't know how to let
them work in Access

Can anyone help ?

Thanx in advance...

Eric
 
A

Alick [MSFT]

Hi Eric,

Do you mean you would like to set textbox control's background color to be
semi-transparent?

The article 249341 provides a sample for calling SetLayeredWindowAttributes
in VB6.0, the code should be similar in Access VBA.

HOWTO: Create a Layered Window in Visual Basic
http://support.microsoft.com/?id=249341

Please feel free to reply to the threads if you have any questions or
concerns.



Sincerely,

Alick Ye, MCSD
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Eric Bracke" <[email protected]>
| Subject: HELP: Semi-transparent or Translucent object on a form
| X-Tomcat-NG: microsoft.public.access.forms
|
| I would like to add a Semi-transparent box on an access form (Access XP on
| WindowsXP)
| I found some api functions like
| SetLayeredWindowAttributes and AlphaBlend, but don't know how to let
| them work in Access
|
| Can anyone help ?
|
| Thanx in advance...
|
| Eric
|
|
|
 
E

Eric Bracke

Thank you for your post, I've seen this page already, but I cannot let this
work.
It doesn't seem to work under Access.
Do you or anyone else has any other solution?

Eric
 
A

Alick [MSFT]

Hi Eric,

We may need a little modification in Access; if we set the Form's PopUp
property to be yes, the code works in Access.



Sincerely,

Alick Ye, MCSD
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Eric Bracke" <[email protected]>
| X-Tomcat-NG: microsoft.public.access.forms
|
| Thank you for your post, I've seen this page already, but I cannot let
this
| work.
| It doesn't seem to work under Access.
| Do you or anyone else has any other solution?
|
| Eric
|
| | > Hi Eric,
| >
| > Do you mean you would like to set textbox control's background color to
be
| > semi-transparent?
| >
| > The article 249341 provides a sample for calling
| SetLayeredWindowAttributes
| > in VB6.0, the code should be similar in Access VBA.
| >
| > HOWTO: Create a Layered Window in Visual Basic
| > http://support.microsoft.com/?id=249341
| >
| > Please feel free to reply to the threads if you have any questions or
| > concerns.
| >
| >
| >
| > Sincerely,
| >
| > Alick Ye, MCSD
| > Microsoft Online Partner Support
| >
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Eric Bracke" <[email protected]>
| > | Subject: HELP: Semi-transparent or Translucent object on a form
| > | X-Tomcat-NG: microsoft.public.access.forms
| > |
| > | I would like to add a Semi-transparent box on an access form (Access
XP
| on
| > | WindowsXP)
| > | I found some api functions like
| > | SetLayeredWindowAttributes and AlphaBlend, but don't know how to
let
| > | them work in Access
| > |
| > | Can anyone help ?
| > |
| > | Thanx in advance...
| > |
| > | Eric
| > |
| > |
| > |
| >
|
|
|
 
E

Eric Bracke

Thanks Alick,

This works under Access, but only for a form.

When used with a subform on a form, it doesn't work. The subform stays
opaque.
Do you think there's a way to let this work with a subform (or any other
object (rectangle, textbox,...) on a form) ?

Thanks in advance,

Eric
 
A

Alick [MSFT]

Hi Eric,

If you would like to create transparent control, mean displaying a
transparent background at all times; one way is to set the the BackColor
property of the control equal to the BackColor property of the form section
in which it resides. For example, put a lable with some content on a form,
put a textbox control onto the label; on the form activeate event or open
event, set the color.

Private Sub Form_Activate()

If Me.Text0.BackColor <> Me.Detail.BackColor Then

Me.Text0.BackColor = Me.Detail.BackColor

End If
End Sub

To see the effects, run the form, move the focus way from the textbox, we
can see the label content appearing inside the textbox control.

A related article:

ACC2000: Form Control Is Not Transparent When It Gets Focus
http://support.microsoft.com/?id=208344



Sincerely,

Alick Ye, MCSD
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Eric Bracke" <[email protected]>
| References: <[email protected]>
<[email protected]>
<#[email protected]>
|
| Thanks Alick,
|
| This works under Access, but only for a form.
|
| When used with a subform on a form, it doesn't work. The subform stays
| opaque.
| Do you think there's a way to let this work with a subform (or any other
| object (rectangle, textbox,...) on a form) ?
|
| Thanks in advance,
|
| Eric
|
|
| | > Hi Eric,
| >
| > We may need a little modification in Access; if we set the Form's PopUp
| > property to be yes, the code works in Access.
| >
| >
| >
| > Sincerely,
| >
| > Alick Ye, MCSD
| > Microsoft Online Partner Support
| >
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| > --------------------
| > | From: "Eric Bracke" <[email protected]>
| > | X-Tomcat-NG: microsoft.public.access.forms
| > |
| > | Thank you for your post, I've seen this page already, but I cannot let
| > this
| > | work.
| > | It doesn't seem to work under Access.
| > | Do you or anyone else has any other solution?
| > |
| > | Eric
| > |
| > | | > | > Hi Eric,
| > | >
| > | > Do you mean you would like to set textbox control's background color
| to
| > be
| > | > semi-transparent?
| > | >
| > | > The article 249341 provides a sample for calling
| > | SetLayeredWindowAttributes
| > | > in VB6.0, the code should be similar in Access VBA.
| > | >
| > | > HOWTO: Create a Layered Window in Visual Basic
| > | > http://support.microsoft.com/?id=249341
| > | >
| > | > Please feel free to reply to the threads if you have any questions
or
| > | > concerns.
| > | >
| > | >
| > | >
| > | > Sincerely,
| > | >
| > | > Alick Ye, MCSD
| > | > Microsoft Online Partner Support
| > | >
| > | > Get Secure! - www.microsoft.com/security
| > | > This posting is provided "as is" with no warranties and confers no
| > rights.
| > | >
| > | > --------------------
| > | > | From: "Eric Bracke" <[email protected]>
| > | > | Subject: HELP: Semi-transparent or Translucent object on a form
| > | > | X-Tomcat-NG: microsoft.public.access.forms
| > | > |
| > | > | I would like to add a Semi-transparent box on an access form
(Access
| > XP
| > | on
| > | > | WindowsXP)
| > | > | I found some api functions like
| > | > | SetLayeredWindowAttributes and AlphaBlend, but don't know how
to
| > let
| > | > | them work in Access
| > | > |
| > | > | Can anyone help ?
| > | > |
| > | > | Thanx in advance...
| > | > |
| > | > | Eric
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|
 

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