Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5954151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:55:48+00:00 2026-05-22T17:55:48+00:00

In my project, I create a form with the opacity controlled by the user.

  • 0

In my project, I create a form with the opacity controlled by the user. If the form was fully transparent the mouse events ‘fell through’ (without my intervention), otherwise my form handled them.

After reading this question and overriding the CreateParams property to set the WS_EX_TRANSPARENT flag on my form, it now allows mouse events to fall through when the opacity is any value <255.

This is exactly what I want, but it concerns me that I don’t understand why it works.

From what I’ve read, WS_EX_TRANSPARENT is meant to make the form appear transparent by ‘stealing bits’ from the form below it in its Paint method, therefore:

  1. The Paint method of my form and all the controls in it should never be called, right? As WS_EX_TRANSPARENT should cause Windows to override them, so why does it affect input handling but not the drawing of my form?

  2. The opacity should have no impact on the handling of mouse events, as if Paint is being overridden the ‘local’ opacity should not matter, no?

Could someone explain, what this flag really does? How does it work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:55:49+00:00Added an answer on May 22, 2026 at 5:55 pm

    WS_EX_TRANSPARENT makes your events (like mouse clicks) fall through your window, amongst other things. Opacity is a separate concept, it instructs window manager to apply alphablending when drawing your form. Those two things are not related, but when you combine them you get the effect you need in your case.

    So:

    1. Paint method of your form is called normally as it should, opacity has nothing to do with it.

    2. Opacity does not have anything to do with mouse events, as described in the first paragraph.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a .net project, create two forms {Form1, Form2} and on each form create
My current project is a form that receives input from a user. After I
I am working on a project in which I need to create a form
How to create a project in WebLogic Workshop (version 10.3) with support for JPA
In my project I programmatically create a web part page and add a web
For some reason, my visual studio 2008 installation doesn't have the Create Test Project
If you create a pure ActionScript project in Flex Builder 3 and want to
Every time I create a new project I copy the last project's ant file
If you create an ASP.NET web file project you have direct access to the
If I create a test suite for a development project, should those classes be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.