EDN Admin
Well-known member
I happened across a solution a long time ago, and I cant seem to find the article again, and never got around to putting it into the main application.
Anyway, here is what I want to achieve:
On a form I can have any number of special user controls, and they are re-sizable, movable, and other such things when clicks on the individual controls.
When a user control is being dragged about the form, I temporarily want it to be 50% opaque. Just the control that is being dragged, none of the other controls. I may end up scrapping this idea if I cant refind the solution, or the solution turns out to
be too much of a resource hog.
So the original solution (drawing from my memory - which might be wrong) is that while the control was being moved (and re-drawn), it would Invalidate the parent form and have the parent form redraw itself and all the child controls, then it would alpha
blend over them.
So I was wondering if anyone might have any ideas as to what Im looking for, or how to achieve it. Ive tried every possible combination of user control, alpha blending, opacity, semi-transparent and what not and cant seem to re-find the solution Im thinking
of.
An example of kind of what Im trying to achieve is for instance in Firefox (the only program that comes immediately to mind, but Im sure other programs have similar behavior), if you click & drag on an image in a webpage, if you look at the cursor,
behind the cursor is a semi-transparent copy of the image. I want to do that with my controls where only when the user is dragging one of them, it becomes transparent.
Alot of the solutions out there are how to make a control, such as say a label or panel have a semi-transparent backcolor. This is not what Im looking for. I want the entire control to be semi-transparent.
View the full article
Anyway, here is what I want to achieve:
On a form I can have any number of special user controls, and they are re-sizable, movable, and other such things when clicks on the individual controls.
When a user control is being dragged about the form, I temporarily want it to be 50% opaque. Just the control that is being dragged, none of the other controls. I may end up scrapping this idea if I cant refind the solution, or the solution turns out to
be too much of a resource hog.
So the original solution (drawing from my memory - which might be wrong) is that while the control was being moved (and re-drawn), it would Invalidate the parent form and have the parent form redraw itself and all the child controls, then it would alpha
blend over them.
So I was wondering if anyone might have any ideas as to what Im looking for, or how to achieve it. Ive tried every possible combination of user control, alpha blending, opacity, semi-transparent and what not and cant seem to re-find the solution Im thinking
of.
An example of kind of what Im trying to achieve is for instance in Firefox (the only program that comes immediately to mind, but Im sure other programs have similar behavior), if you click & drag on an image in a webpage, if you look at the cursor,
behind the cursor is a semi-transparent copy of the image. I want to do that with my controls where only when the user is dragging one of them, it becomes transparent.
Alot of the solutions out there are how to make a control, such as say a label or panel have a semi-transparent backcolor. This is not what Im looking for. I want the entire control to be semi-transparent.
View the full article