Jump to content
Xtreme .Net Talk

Recommended Posts

  • Leaders
Posted (edited)

I am trying to use the transparency key property of a borderless form with a bitmap as the background, as per the instructions in visual studio's help, to create a custom shaped form. The outcome is what it should be, visually. When I click on transparent regions within the form, however, they still receive events rather that passing them to the underlying forms (even though you can see through to the underlying windows where i am clicking). This behaivor is contrary to what should be expected according to visual studio's help.

 

Are there any known bugs like this, or any workaround or anything of the sort?

 

Edit: Also, when I use spy++, I can see in the outline of the window (using the find window tool) that the region includes the transparent areas.

Edited by snarfblam
[sIGPIC]e[/sIGPIC]
  • Leaders
Posted
I know custom regions would work the way its supposed to, but Ive done the same in the past (using vb6 and windows api) and the results were initially ugly and it took alot of work to get what I wanted. And then what if i wanted to change the shape of the form?
[sIGPIC]e[/sIGPIC]
Posted

are you sure the color you defined is the same that is on the image becouls if you use a 32 bit bitmap

that are a lot of colors and if are difine the color to be RGB(18; 45; 231) this not the same as rgb(18; 45; 232) witch is the same by the human eye.

 

althou i did not use a bitmap i used a gif file as my bitmap

in my case the behaviour did as it supposed to and the events were given to the underlying application

 

maiby you should try it with another file format.

 

good luck

  • Leaders
Posted

In response to Engine252: of course I picked the right color, it was showing up transparent, which I did say in my post. I'm not stupid, and i'm not a newbie, but I am insulted.

 

And thanks for the link, Hamburger1984. It is a good solution to my problem.

 

But what I was really looking for was the answer to my question:

Are there any known bugs like this, or any workaround or anything of the sort?

[sIGPIC]e[/sIGPIC]
Posted

Here is a known bug

http://support.microsoft.com/default.aspx?scid=kb;en-us;822495

 

but then you have this other bug that they don't even know about. However, I have sent this message.

 

This workaround works for the background. BUT� If there is a ListBox, TextBox, or ComboBox on the form anything within (or) on these controls that is BLACK becomes transparent. This includes BLACK text in the control. If BorderStyle is set to FixedSingle the border is transparent, and the little black arrows on the scroll bars also become transparent if there is enough text in the control to make them appear

  • 2 weeks later...
  • Leaders
Posted

Thanks a bunch fartnocker.

 

I was aware of that bug. I was not aware of a workaround, though. I tried it and it solved my problem.

 

One more time, many thanks to fartnocker.

[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...