dannylin said:
[...]
But one of my customer's feedback wants us to add the transparency to
swf, then he can place transparent swf on top of an image file.
after i google it and search lots of forums, I found the .net doesn't
support "windowless control",
I'm not sure what "windowless control" is even supposed to mean. In
Windows, _all_ controls are windows, by definition. An application can,
of course, implement its own user-interface scheme in which there are
things that look to the use like controls, but they wouldn't actually be
controls in the sense that the Windows API (_all_ of it, not just .NET)
uses the word "control".
which makes transparent swf is
impossible. I don't know why .net has this limitation because the same
requirement(transparency) can be easily achieved by vb6 and vc++.
It's true that .NET Forms do not handle transparent controls very well,
if at all. The only approaches I've seen that work are basically hacks.
But I don't think that manipulating forms in this way is the right
solution. You would be much better off switching APIs than trying to
force Forms to do what you want.
But we don't want to change a language, so we think the alternative is
to create forms instead of controls. we then can set the window to
WS_EX_layered to get the form work like a layered controls in my old
program.
anyone has better suggestion would be very welcome
If I recall correctly, WPF supports transparency at the control level,
not just the top-level windows. So one option would be to use WPF
instead of Forms.
I'm curious about your claim that "the same requirement(transparency)
can be easily achieved by vb6 and vc++". As far as I know, this is not
true (they, and especially C++, should have the same limitations as
Forms, as Forms is just a thin wrapper around the unmanaged Win32 API).
But, assuming you can do it in those environments, another alternative
would be to implement the specific transparency-related functionality in
C++, and then call that from your C# code.
Pete