Solved

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

Posted on 2003-10-26
3
368 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
[X]
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
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

717 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