Solved

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

Posted on 2003-10-26
3
365 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Connection String 16 60
Example works but why do I need to click twice on button 4 42
Help with converting xml file to excel using VB.NET 3 20
Powershell File Sort 8 31
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

777 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