I like to graphically design some of my apps.
But using .NET controls (picbox, label) is not to my liking.
In VB6 I could put a label over any picture (on form or picturebx) and EVERYTHING under it would show.
In .NET I have not found a way to do this.
I've tried every transparency setting there is for label and picturebox, but still can not just do a simple task that was so easy in VB6.
SEE ATTACHED PICTURE (below)
It works fine if you just put it on a form... and thats it!
It will work if you put a picture in the form. But the picture is tiled... so what about resizable forms where you only want the one instance of the picture to show... plus if you have a toolbar.... to bad...
the top of the picture disappears under the toolbar!!
What was MS thinking??
How do they expect people to use these "transparency" on controls. The form color is really the transparent color!! duh
THAT IS NOT TRANSPARENT!!
I REPEAT...
THAT IS NOT TRANSPARENT!!
So, far I have liked .NET up to this point, but unless I can find some easily implementable methods to make ONE stupid label control "transparent" so that everything under it is VISIBLE....
Then what is the point... Graphical interfaces are only do able if you create a graphic that shows it all.
How will people make wizards that have labels of text over pictures that change frequently.
COME ON MS.... WHAT ARE YOU THINKING!
there, I am done ranting.
Last edited by epixelman; Mar 20th, 2005 at 12:59 PM.
if you want the label below other controls, make it first.
might be a fix for the case after you've made all the controls and don't want to start over, but that's what i do.
Choey,
Ahh... great if I want to set the zorder.
If you put the label behind the blue box... you won't see the label.
I am talking about transparency.
The label and picbox (dove) 's backcolor is set to Transparency.
Do they look transparent to you?
RobDog...
I've tried that... but how do you put a whole paragraph from a textbox over a picture without sending each line one by one? Not to mention the re-painting of the text if another form goes over it.
And how would you draw a transparent gif over the blue box?
There was a demo that would be perfect for you. I think it was be Wokawidget here in vb.net forum.
I will look for it. Be back in a couple of hrs. Time to go home.
Ewe, 9666 posts.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
How do I put a transparent gif on top of a picture box??
How do I put a transparent paragraph of text on top of a picturebox??
Is this to hard of a question?
You can put these 2 controls on top of a form with a background picture and it will work. But you can't put them on top of a picture box or panel. (see below)
As you can see with the 2nd pic... the transparency does not show the brick background of the picbox... but the form background.
That is no TRUE transparency!!
.
Last edited by epixelman; Mar 19th, 2005 at 07:17 AM.
If I could use just the form, that would be great.
But you have no control over the background picture because...
1) It only tiles the pictures. So if I needed to display just one picture (not tiled) then I would have to size the form to the size of the picture. Leaving me no choice but to use Single Fixed for borderstyle. So if the pic changes the border would have to change to.
2) You can put a toolbar (or any other controls) on the form. But any picture you put in the background will be covered up by the other controls.
How is anyone suppose to make a graphical application if they can't even use transparent controls that can be moved around.
I only see one way to get around the transparent label...
and that is find a standlone OCX label that supports "TRUE" transparency that I can convert with a wrapper DLL to use in .NET
Anyone know of an OCX label just like the one on the standard toolbox of VB6???
I would really appreciate it.
FYI... I did find a .NET label control off of PSC that someone tried to make. And it does work for one line only... it's buggy though. Doesn't wrap the text like a regular label control is suppose to. So I can't use it.
I'd make one myself, but haven't got a clue how to.
Have you tried making your own standalone OCX, with but a simple label on it? It is pretty easy, and you can do the resizing stuff in a few lines of code. "Inheriting" Properties from the OCX to the Label might be a trick...
Nobody knows what software they want until after you've delivered what they originally asked for.
Don't solve problems which don't exist.
"If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)
1. Its dead easy to draw a paragraph of text onto a picturebox (assuming it doesn't spill over onto another control. Just take a look at the Graphics.DrawString(...) overrides and you will find one that lets you specify a rectangle to draw the text inside. You can work out the rest.
2. Transparency of controls can be accomplished but it is pretty low level. You may have to resort to blitting from a graphics object. I hate using bitblt because it is not framework.
Have you tried making your own standalone OCX, with but a simple label on it? It is pretty easy, and you can do the resizing stuff in a few lines of code. "Inheriting" Properties from the OCX to the Label might be a trick...
I've never made a control in VB6 or .NET
I could try in VB6... because the label is already made. I would just have to figure out how to add all those properties.
1. Its dead easy to draw a paragraph of text onto a picturebox (assuming it doesn't spill over onto another control. Just take a look at the Graphics.DrawString(...) overrides and you will find one that lets you specify a rectangle to draw the text inside. You can work out the rest.
2. Transparency of controls can be accomplished but it is pretty low level. You may have to resort to blitting from a graphics object. I hate using bitblt because it is not framework.
The paragraph text would always change and I would never know how long it would be. I have to contain the text in a given area that depends on the size of the area because the form is resized.
I want to stay with true framework... no VB6 code.
P.S. I don't like posting in the "Com And ActiveX" forum (even though I have to) because people don't visit enough.... So I will post here concerning updates until this thread is solved.
Thanks
.
Last edited by epixelman; Mar 19th, 2005 at 09:56 PM.
Start a project
Put two picturebox's on the form
Set the background picture of one form to whatever you like.
Set the image property of the other picturebox to contain a transparent gif and set the backcolor to transparent.
Now you want the transparent gif to show the background of the first picturebox and NOT the background of the form.