Transparent Panel Problem

  • Thread starter Thread starter choffi
  • Start date Start date
C

choffi

Hi,

I have a problem which, having looked through various previous
postings, I notice that others have also come across. The problem I
have as follows:

I have incorporated an external Active-X control into my VB.NET
project. The control itself works very well (it parses and displays
AutoCAD DXF files). The problem is that I need my users to be able to
use the graphical UI for drawing shapes on a panel I have designed
superimposed over this control so they can trace the lines etc. within.
I had thought that this would be a very straightforward process but the
"Transparency" that is supported by the panel is just a fudge to paint
the control with the background of the form which is no good to me. I
need a control at the same level but behind the panel to be
transparently behind it. I have been banging my head against the screen
for most of the day trying to get some kind of work-around working. I
have tried everything I can think of. I have also tried including
suggestions gleaned from these forums, e.g. trying to invalidate the
parent control. I have also tried another idea which was to try and
make the control opaque using a technique I found on another website.
Nothing so far has worked.

I think one of the problems is that I am using double bufferring,
however I am pretty sure I need this otherwise the whole UI for
designing just looks flickery and rubbish.

I would be willing to start trying some low-level stuff such as
blitting from the Active-X control to my panel if that's possible but
to be honest I would not know where to begin with that.

I am running out of ideas. Does anybody have any suggestions? I am
willing to consider any workaround for this now as I need to get it
working!

Thanks,

Mark Thompson.
 
You might try a picture box instead of a panel and in the paint event, use
blbit to transfer a bitmap with a transparent background. You could draw on
the bitmap. Just a suggestion which may or not work but could give you some
ideas.
 

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

Back
Top