Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to create a transparent control clickable itself, not the controls under ?

Posted on 2003-10-26
3
366 Views
Last Modified: 2007-12-19
I'd like to create a transparent control (panel, picturebox ...) that can be clickable when the control is transparent.

I don't want that the controls under my transparent control are clicked (because they are activex controls with their own click properties).

Or if someone know how to bypass an activex context menu !


Thanks in advance for your answer.
0
Comment
Question by:noulouk
3 Comments
 
LVL 2

Accepted Solution

by:
Inteliscape earned 125 total points
ID: 9632896
Transparency in .net is something weird...very much!!! and is not working as it was in VB6 or C/C++
Transparency there is not actually exist in .net is more like copyparent (copy the background of the parent control)
More! For some reason .net will not let you set a form into another form (at least I didn’t) and use the transparent of that form.

I try hard to have a transparent control but the only thing I came up was with these 2 little tricks and here are

First these lines can let you use for background the transparent web color.
You need only 2 lines as you see below


    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()
        '---------------To support transparent color!!!--------------------
        SetStyle(ControlStyles.SupportsTransparentBackColor, True)
        Me.BackColor = Color.Transparent
        '----------------------------------------------------------------------

        'Add any initialization after the InitializeComponent() call
    End Sub




And my other solution was to paint the control above other controls
and here is a link to this - I submitted this a long time ago...early days of .net
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=610&lngWId=10
These 2 I hope will help you :) something to start.


There is no other solution exept if you design a control in VB6 or C/C++ and use it.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 10224377
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: Inteliscape {http:#9632896}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question