473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Transperancy

I am having trouble understanding how to code to get a control to have a
transparent background in VB6

I have a .PNG file with the a pretty foreground image and a background as an
alpha channel. I am trying to use this either as a picture box or as a
label. I can set the background color nicely to any shade in the chart, but
transparent does not work.
I need to have the foreground 100% OPAQUE AND THE BACKGROUND 100%
transparent.
I can recolor the alpha channel to any color needed to specify transparent
with Photoshop.

I do not need to manipulate transparency during the execution, just need to
turn image visible or not and move it around.
I have found several Google references, but the code always results in "this
control not allowed transparency"

where do these lines of code go?

SetStyle(Control.SupportsTransparentBackColor, True)
Me.BackColor = Color.Transparent
Form1.TransparencyKey(System.Drawing.Color.Transpa rent)
The instructions are very vague.

suggestions??


Nov 21 '05 #1
3 943
Joisey,

Not the most simple question mostly. This is a VBNet newsgroup and your
question will probably have a very different solution in VB6.

I advice you to ask this question in the newsgroup.

microsoft.public.vb.general.discussion

I hope you find your answer soon

Cor
Nov 21 '05 #2
Sorry for TYPO (late at night)

Definitely using Visual Basic.Net 2002 standard edition......
joisey
"Cor Ligthert" <no************@planet.nl> wrote in message
news:OU**************@TK2MSFTNGP11.phx.gbl...
Joisey,
Not the most simple question mostly. This is a VBNet newsgroup and your

question will probably have a very different solution in VB6.
I advice you to ask this question in the newsgroup.
microsoft.public.vb.general.discussion
I hope you find your answer soon
Cor


Nov 21 '05 #3
Joisey,

This are always very difficult questions to get answers.

Maybe can you search for your self in this newsgroup,
http://groups-beta.google.com/group/...h+this+groupOr ask this in the newsgroupMicrosoft.public.dotnet.framework.drawing where you have probably the mostchange.Although png is a speciality from Herfried, so sending this message again inin this newsgroup with VBNet instead of VB6 can maybe help.Cor

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Keon | last post by:
Hoi Do someone know how i can make the background of a iframe transparancy? I already tried it with filter: Alpha(Opacity=50,); but it also make the text transperancy. do someone know how to...
18
by: nutso fasst | last post by:
Hello. Is there a way to make an element 'transparent' to mouse activity, such that mouse events go to the underlying element? I have an absolutely-positioned image element with transparency...
3
by: Tom Thorpe | last post by:
To all wizards: I have a "C" DLL file already built and running, but I want to have the DLL accessible(callable) from anyway within a LAN and/or WAN( and even multi-WAN's), or even on a PC. I...
2
by: J.R. | last post by:
I have a splash form that has a background color, that is also the background color of its background image. However it does not always remain transparent, I have found this issue to usually occur...
3
by: hannibaal | last post by:
please help me find out.. i have tried to reverse enginere the fade out code but it just isnt working thanks
2
by: yossi mardan | last post by:
hi while a shape control moves fast in the form it blink. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Shape1.Top = Y Shape1.Left = X
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.