|
|
Comments and Discussions
|
|
 |

|
I have downloaded your project from 'Code Project' and also your OSWebBrowser from Google however
unfortunately the latter makes uses of additional functions not included in your source in
'Code Project', specifically the method ResizeRegions in the alphaFormTransformer class and the
ResizeRegionType enum.
can you upload a revision on 'Code Project' containing these changes so I can utilise the resize feature.
|
|
|
|

|
When I try to record the application only the underlying form shows its components but not the skin :/
AlphaForms allows me to create stunning windows forms, thanks.
But I really want to be able to show the world via youtube etc...
Can anyone help me?
|
|
|
|
|

|
Hi,
I'm using your method as DLL in a VB.Net environment. I did all what you wrote in the description above.
But, when I start my form, it always shows minimized in the taskbar only, not on desktop...(??)
What can it be?
After all, how should the backgroundimagelayout be set in the form and the alphaformtransformer?
centered or stretched or...
regards from Austria-
Dietrich
|
|
|
|

|
Great Job.
Really Usefull!!!
|
|
|
|
|

|
How to change the transparency dynamically?
|
|
|
|

|
Hiyas, love this in general, but I've got a problem with my form. When I drag it around the background where my controls are shows through. It sorts itself out when the drag stops, but during the drag it's as if the controls on top of the form are lagging behind the form's movement, hence bits of the underneath show through until they `catch up'.
Here's what I'm doing:
(1) Each control (buttons) has a rectangle in the skin that's transparent.
(2) I place a marker into each rectangle where a control is to appear (border = 0)
(3) I place the control over the transparent box such that it fits perfectly.
As I say, when dragging the edges around the controls show through to the desktop.
Any hints?
|
|
|
|

|
I means program like editor audio or video with beautiful slider, pot etc.
|
|
|
|

|
I have seen the article for [An Alpha Channel Composited Windows Form with Designer Support] for c sharp. How do i do that in vb 2010
I would like to smooth out the edges of a circular form in VB. Any method that works is welcome
|
|
|
|

|
it is Difficult 2 use, so anybody tell me how can we use it simply
|
|
|
|

|
Hello!
I wanted to thank you for your project, it been a hell of a good helper for me
During the use I noticed 2 things that bugs me a lot...
First is the CanDrag option... No matter what I will set in the properties window or even in code, the form is still drag-able
Second is pretty unussual, and I dont sure that is fixable. The problem is that my form suppossed to be a child of the desktop. I achieve it by this code:
IntPtr hDesk = FindWindow("Progman", "Program Manager");
if (hDesk != IntPtr.Zero)
{
hDesk = FindWindowEx(hDesk, IntPtr.Zero, "SHELLDLL_DefView", "");
if (hDesk != IntPtr.Zero)
{
hDesk = FindWindowEx(hDesk, IntPtr.Zero, "SysListView32", "FolderView");
if (hDesk != IntPtr.Zero)
{
SetParent(this.Handle, hDesk);
}
}
}
And it works fine for a regular form. But when I did this to a form that had alphaFormTransformer, it had a wierd effect.
The region of the form, was the child of the desktop... But the PNG that is the background for alphaFormTransformer, acted like a ussual window(could get on top of other windows).
Can you help me to get rid of this annoying effect? Thanks!
|
|
|
|

|
We're developing a small app using alphaform to make a nice user interface. (thanks a lot for alphaform!, is a lifesaver!)
In some of our test machines, we are getting this exception:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at AlphaForm.AlphaFormTransformer.UpdateRectListFromAlpha(ArrayList rectList, Rectangle& bounds, Point seedPt, Byte[,] alphaArr, Int32 width, Int32 height, Int32 border)
at AlphaForm.AlphaFormTransformer.UpdateSkin(Bitmap frameBmap, Bitmap backBmap, Byte opacity)
at AlphaForm.AlphaFormTransformer.TransformForm(Byte opacity)
We don't know why it happens, the skin is always the same, and we don't understand why in most cases it's working normally, and in some other is not.
|
|
|
|

|
Spot the bug in the following excerpt of code from v1.1.3:
public void UpdateSkin(Bitmap frameBmap, Bitmap backBmap, byte opacity)
{
// From an internal perspective, frameBmap is the layered window contents
// and backBmap becomes (potentially after scaling) the transformer control
// BackgroundImage.
if (frameBmap == null && backBmap == null)
throw new ApplicationException("Must specify at least one bitmap to UpdateSkin()");
if (!Bitmap.IsCanonicalPixelFormat(frameBmap.PixelFormat) || !Bitmap.IsAlphaPixelFormat(frameBmap.PixelFormat))
throw new ApplicationException("The frame bitmap must be 32 bits per pixel with an alpha channel.");
(The initial test allows frameBmap to be null if backBmap isn't, but the following line will then throw a NullReferenceException).
|
|
|
|

|
When you want to use it for a SplashScreen for example (i.e. no controls, just an empty form except for the alphaFormTransformer, the user will be able to drag around the Form anyway, even if the CanDrag property is set to false. Just change one line inside of the LayeredFormMouseDown() function to this:
if (CanDrag && e.Button == MouseButtons.Left)
Works fine! Is this a bug? I actually can't see the CanDrag property being checked anywhere in the class!
|
|
|
|

|
Some kind of 9-grid sizing would absolutely rock, too...
|
|
|
|

|
I thought about it at some point. The challenge being with bitmaps resizing is a can of worms - at some scale it won't look good.
|
|
|
|

|
Hi Jeff. Your article was very helpful for my work, but I has been needed resizable window too. So, I implemented it. I can send you my sample project. Maybe it would useful not only for me .
|
|
|
|

|
Can we please have instructions on how to resize it?
thank you, and awesome code, really.
|
|
|
|

|
Hello.
I prepared my sample project for you. You can take it by link:
http://dominichenko.com/OSWebBrowser.zip
I had cutted all specific functionality from there and now here is just logic for transparent resizable window building. (So, don't be frightened of some empty methods and so on ).
It's very easy to make it resize with full redrawing, but with this not so optimal logic of creating transparent window it's very slow, so when resizing I'm drawing just inverted frame.
Don't hesitate to write me if you will have some questions.
P.S. Just open and build OSWebBrowser solution from archive.
--
Sincerely,
Maxim
|
|
|
|

|
Maxim I finally got around to looking at your resize additions - very cool
|
|
|
|

|
Hi.
Website seems to be down.
Can I download your additions somewhere else - I'd love to have a look at them!
|
|
|
|
|
|
|

|
Ok finally had the chance to check the new version and the hiding works flawless, not to mention the new examples are very clear.
So far performance doesn't seem to much of a concern but i haven't done anything too big with it.
So i am wondering the following.
Lest assume a standard business app, you know some data manipulation and reporting, some charts here and there. Assuming computers with, lets say, single core cpu and 512mb ram running winXP. Would this library (or similar per pixel alpha blending) on top of windows forms be fast enough? How would it compare with WPF (and eye candy with it)?
(i am newish to .net in general)
Of course i don't expect an exact answer or anything like that, but maybe there where some folks around with first hand experience with either this (or similar per pixel alpha blending) and wpf and could share a couple of lines regarding performance.
Thanks in advance!
|
|
|
|

|
This component's usefullness is somewhat narrow. It just provides for non-standard window borders using bitmaps in a WinForms applicaton. For alpha composited controls and visual elements in general, WPF is the place to be.
|
|
|
|

|
Basically wondering if controls have to always be placed in transparent areas marked with a AFMarker instead of, lets say, put a button straight on top of part of the image?
|
|
|
|

|
No there is a tutorial for doing what you want in the full source download - see the Help/Tutorials directory.
|
|
|
|

|
Yeah i was using the same method as the one in your tutorial but after rereading i see my problem was the antialiasing on the inner edge of the image.
Crash-coursing Photoshop at the same time sorry :/
btw, is it ok if we also disable antialias for the outer edge of the background image? i double checked the tutorial but the only comment i found was to use antialiasing on inneredges if we wherent using another image as background. If i missed it or is otherwise implied i am sorry.
Thanks in advance!
|
|
|
|

|
That's what i'm looking for,thks!
|
|
|
|

|
I'm trying to include an animated GIF in the form (for a splash screen).
The problem I'm facing is that the image is showed static (i.e. only the first frame).
Any suggestion?
Thanks
|
|
|
|

|
Look at the examples in the download or this article on updating the image of the alpha-form on-the-fly. I think you would have to do a frame-by-frame update yourself to do something like this.
|
|
|
|

|
Thank you for the reply, but probably I've not explain it very well (sorry!!)
The problem is not about the image of the alpha-form.
What I'm trying to do is to insert a picture box in the form with a animated gif in it.
In a normal form it loads correctly and the gif is displayed as it should.
If I insert the picture box in a "alpha-form" the image is showed static.
Maybe I can change the frame manually, but I'd like to know if there is a smarter way to do it.
Or maybe gifs are not that much compatible with alpha-form (my gif hasn't transparent areas but in general they have an alpha channel, right?).
|
|
|
|

|
I'm sorry but I don't know why alpha form would interfere with the operation of a picture box with an animated GIF.
GIFs have a 1 bit mask if I recall - I don't know how the picture box control would composite it with other controls.
|
|
|
|
|

|
Thank you, Jeff, very much, for bringing in the latest version here.
best, Bill
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844
|
|
|
|

|
Great job, but it seems that the ToolTip stops working after I drag the form on the desktop. Is there some quick workaround?
|
|
|
|

|
when I use this, the form1.Visible = false; no longer hides the form, instead it hides just the controls on the form, the image for the background still stays. is there a way to show/hide the form completely via a method?
|
|
|
|
|

|
Pity you didnt mention the fix you found
I ran into the same problem so replying the fix I found for other people to use or critique.
Basically yeah, i have several forms that have an AFTransformer and i was having trouble when doing a myForm.Hide()that the image/skin associated with the AFTransformer stayed on screen. Tried several methods on the AFTransformer Instance to hide it. Finally the one that worked:
MyOtherForm myF = new MyOtherForm();
myF.Show();
this.Hide();
this.theAFTransformerInstance.UpdateSkin(anyImage, anyImage, 0);
Basically i call the method inteded for reskinning and set opacity to 0 to make it disappear.
There is probably an obvious way i am missing :(
|
|
|
|

|
I need to post version 1.1.2 to codeproject which has a method for this (SetAlphaAndParentFormVisibility()) plus some bug fixes. I'll do it this weekend and hopefully CP will post it soon.
--jeff
|
|
|
|

|
I simply modified the transparentskin control to add an event handler for the main form's visiblitychanged event. Then in the handler I set the layeredwindowform's visibility to be the same as the main form. so then , you never mess with it or call and methods, you simply hide the Main form and the layeredwindow follows suite. of course there is an issue with that, there is sometimes a delay in the effect on lower end machines, so the center disappears before the border.
ParentForm.VisibleChanged += new EventHandler(parentFormVisible);
void parentFormVisible(Object sender, EventArgs e)
{
m_lwin.Visible = ParentForm.Visible;
}
that's it and it works.
|
|
|
|

|
Interesting way around it, i think i will wait for the next version though.
Many thanks for sharing that approach.
|
|
|
|

|
Version 1.1.3 has been posted which has a method for hiding the form. See the release notes at the top of the alphaform.cs file.
|
|
|
|

|
Thanks a lot!
Going to mess with it today
|
|
|
|

|
To start off, this is a great article. However, one limitation of your design that the application i'm making cannot handle is that there must be a transparent section in the bitmap with a marker (so you can see through to the actual form) to see and interact with the controls, however my application requires that the control be on the bitmap itself. I tried extracting the code for the LayeredWindowForm class out of your DLL and integrating it into my application, and then making a form inheriting from it and putting controls on it. However, the controls do not show after i call the SetBits method (i assume because they're being painted over). Is there any way i can add controls on (and paint on the graphics of) a form inheriting from LayeredWindowForm after the SetBits method has been called? Any suggestions are appreciated.
|
|
|
|

|
Hey, I have successfully used Flash.ocx control in C# to play SWF movie file but I have faced some limitations in it. I jumped to any specific frameNo by using gotoframe() method given in this control, It do jumped but the problem arise when I try to jump on frame which is greater than 12,500 i.e: It only understands starting 12,500 frames of the movie although it do play frame grater than 12,500 but the problem is to jump. Do anyone has idea about this problem.
Plus I also want to play the movie at 1/2X,2X,4X,... speed, Is it possible using this control or I should look for another and what should that ANOTHER(remember I need it on windows form).
regards.
|
|
|
|

|
Hallo,
I want to use this great idea in VB. I tried it to use it at an info-form. I wrote the following code in the forms code:
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Text
Imports System.Windows.Forms
Partial Public Class frmCustomForm
Inherits Form
Public Sub New()
InitializeComponent()
End Sub
Private Sub frmCustomForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AlphaFormTransformer1.TransformForm()
End Sub
Private Sub AlphaFormTransformer1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles AlphaFormTransformer1.Click
Me.Close()
End Sub
End Class
frmCustomForm is my form, I have a fine picture made with Gimp as png.
When I start the project, a great custom form is shown!
But one thing functions not:
The Click on the AlphaFormTransformer...
What can it be?
Greetings from Austria
Dietrich
|
|
|
|

|
I don't see why that wouldn't work as long as you click on the form and not the image frame.
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
An alpha channel composited form for image based Window frames
| Type | Article |
| Licence | CPOL |
| First Posted | 16 Jun 2007 |
| Views | 162,157 |
| Downloads | 41,361 |
| Bookmarked | 263 times |
|
|