I tried checking out the other threads I could find regarding form transparency for VB6.0, but I can't quite find the answer I'm looking for..
How would I go about setting a form's window background to transparency, whereas all other controls and objects remain fully visible enabled and accessable.. In essence doing a cutout of the unneeded part of my form window.
My part of the app in question is a toolbar-ish form that sits at the top of the screen using always-on-top api to hold it in view.. but I need transparency for the rest of it..
Also, a side note.. how could I introduce a label/picturebox on top of the menubar on the far left side?..
If my post has been helpful, then please rate it accordingly...
If it has solved your question(s), then don't forget to mark the thread as "[Resolved]"... thank you.
I am having exactly the same problem and neither of theese axamples works for me.
What I need is a truly transparant form, not a form that is a hole.
It realy should work as a pane of glass, you can see what is below it but you can't touch it, mouseclicks and so on should not affect the underlaying objects
I have some code that will copy everything displayed on the desktop and put that as my background. It's just one "smaller" problem that it catches my window to...
This isn’t an attempt to hijack the thread but, as it happens, I’ve been struggling to do much the same thing for a day or two..... Moeur’s code (above) nearly works for me except that label1’s background remains as bilious green instead of transparent. Did I set a property wrong somewhere? If only it could be made to be transparent I’d be happy.
Sorry for the delay in answering (Christmas festivities/multiple lagers getting in the way) but I’ve managed to sort it all out now.
1) I’d set the form properties to ‘no border’ (because that’s what I thought wanted) but the transparency works with all form types except ‘no border’ ….
2) Having set the border property to something else I just un-commented the 'Call ToggleCaption(False)’ line – to make the border transparent - and everything works fine.
Currently I'm using a "hole" form and api calls to get thou mouseposition, mousebuttonstate and windowstate.
Currently it will detect a click through my app and reset focus back to my app. It's not truely glass but it will do the jobb. The major problem was to handle mouseclicks when another app wa laying above. Since I use api calls i still got those clicks to but by checking active window that can be handled
You want the form background to be transparent and you want all clicks to the transparent part to be passed to the form underneath? If this is all you need to do, and you don't need any other fancy options like dragging the transparent form by its controls, the answer is simple. I have a code snippet on my computer right now thats not more than 30 lines long and it produces true transparency. Controls on forms beneath can be clicked and I believe you can even adjust the degree of transparency from 0% to 100%. If this sounds useful to you, I'll post the code. Maybe it'll save you a lot of time because I know it took me a long time to figure out how to do that.