|
Hello,
I did a quick test on my side (with VS 2008), and I can do that seamlessly:
(Code on Form Load)
Dim agp As New AlphaGradientPanel
agp.Size = New Size(100, 50)
agp.Location = New Point(50, 150)
Dim c1 As New ColorWithAlpha
c1.Color = Color.Red
Dim c2 As New ColorWithAlpha
c2.Color = Color.Yellow
agp.Colors.Add(c1)
agp.Colors.Add(c2)
Me.Controls.Add(agp)
Is that not working on your side ?
Cheers,
Nick
http://www.blueactivity.com
|
|
|
|
|
Hi, i needed this to cover a whole form and have it semi transparent and show something on it, in a way that the whole form including the controls remains slightly visible. the problem im getting is that although i set the alpha levels and all, the controls are not visible through the panel... is there a way to do this? thanks
|
|
|
|
|
I compiled your demo application, and everything is working fine except transparency. I can't see components under AGPanels, because their background is the same color as the main form (standard way of interpreting Transparent color in .NET). How can I obtain effect shown on image in your article (see image under AGPanel)? I am using VS2008 under Windows XP.
|
|
|
|
|
I've the same problem! I'm using Windows XP with VS2005.
I don't know if its because i use Windows XP that i can't see anything transparent.
It would be nice if the person who published this code could give us a hint...
-----
Chris
|
|
|
|
|
Hi,
your control is the best I have seen and used for a long time.
But I get an exception when I resize my main form on which are MANY nested AGPanels.
I can reproduce the failure if I resize the main window to a minum and the then back.
Or sometimes it happens just after minmizing and maximizing the window.
Here is a snippet of the exception(the part within double quotes I translated from german to english"):
<br />
System.NullReferenceException: "Object reference was not specified on an object instance."<br />
at BlueActivity.Controls.AlphaGradientPanel.AlphaGradientPanel_Paint(Object sender, PaintEventArgs e)<br />
at System.Windows.Forms.Control.OnPaint(PaintEventArgs e)<br />
at System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs e, Rectangle rectangle, Region transparentRegion)<br />
at System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs e, Rectangle rectangle)<br />
...<br />
Could you please help me to fix that bug, because I'm using your control on a project at work?
Best regards
BBWicked
|
|
|
|
|
i am a newbie so sorry to ask questions like this but i tried to reference the alphagradientpanel.dll it says ok and i can see it in the references then i built the application but anyway i coludn't see it on my toolbar (i am using vb.net 2005).
|
|
|
|
|
I'm using the code in a other project to modify it and get a nice button but i'm having a problem.
How can i delete a color?
I'm trying to delete it in design mode but it won't disapear from the color list and I'm getting an error.
When I delete it in de disigner generated code it's gone but I don't think thats the way it should be done?
When I re add the color in the designer I get the same error (something about component not being serializable).
Did I forget to copy something?
Also when I re add it in the designer code, I can set the color but the colorproperty above it gets the same color.
When I do this in your default project it all works fine.
|
|
|
|
|
Very nice!
Maby you could explain a bit more of what you did to get this great result.
Just like many more did with their projects on the code project.
Or perhaps you could add soms comment to the code or even only to the properties.
It will help al lot of coders who do not "yet" have great coding knowlage.
Thanks for sharing this with the world 5/5!
Raymond
|
|
|
|
|
Thanks Raymond,
I promise I will try to comment my code more. But currently, I'm on vacation and I don't have access to my system and I won't be able to do anything from here. Perhaps you could try to explain what you don't understand and I could give you a hint ?
Cheers,
Nick
|
|
|
|
|
It's not one thing, i'm interested in all of the code.
Especialy the alpha blending.
I'n starting to learn that basics of GDI now, but understanding this is hard withoud some comment.
So thats why I postet this suggestion, not only for my selfe but also for all other "beginners" who come by this nice peace of code.
If I'm going to understand exactely what you've don, then maby I could make a control with the same feature(s) my selfe.
If I'm having specific questions I'll ask.
Thanks for the re!
Raymond
|
|
|
|
|
Nick,
This is excellent work. What is the licensing policy for this code? Can it be incorporated into shareware applications?
Thanks -- Bryan Kinkel
|
|
|
|
|
Hi Bryan,
You can include it in your shareware, no problem. Maybe you can provide me then with a version of your shareware so I can see it in action
Cheers,
Nick
|
|
|
|
|
Nick - I sent you a private email about the application.
Thank you for the permission. More details are in the email.
Is there a way to increase the border width on the panel control?
-- Bryan
|
|
|
|
|
This seem to be an excellent control and we would like to use it our application. You mention above you don't mind it being used in shareware, but would you allow use in a commercial application?
If so please let me know what kind of credit you would like. Mention in the about box, etc.?
If not thanks for the great control. Maybe I'll find a personal project to use it in.
Thanks!
Matt
|
|
|
|
|
Hi Matt,
What kind of application would it be ?
Basically, I'm not against the use in a commercial app. Credit would be nice to "www.blueactivity.com". And if you want to provide me with one copy of your application, then it would be great.
Cheers,
Nick
http://www.blueactivity.com
|
|
|
|
|
Great job. My problem is that im trying to use this panel over another panel showing direct3D, that is not a background. Nothing of the content except the backgroundimage of the panel itself is shown through the alpha panel.
|
|
|
|
|
hello i am using your alphagradientpanel, and it is working pretty well, but I would like to change some things in the property colors() thank to the code.
can you explain me how to do that.
thank you
mraviator >>>> i noticed that if you copy the alphagradientpanel in an other panel, then it works.
excuse my english ^^
|
|
|
|
|
Are the panels only transparent in Vista? I've run your sample application on XP, and the panels are not transparent.
Many thanks
|
|
|
|
|
I've played with this for a couple of hours and I'm finding these errors:
Environment: .Net 2005
In the designer, when you copy and paste a panel so that you can reuse your design. It isn't creating a new object in some form. I know that the colors object is the same reference because changing the color on one panel changes the color on both panels.
-- modified at 9:22 Tuesday 27th March, 2007
|
|
|
|
|
Great control!
There seems to be a slight problem when I copy an existing AlphaGradientPanel control and paste it on the same form. All colors and other properties are still tied together. Things work just fine when I start teh 2nd control from scratch.
Just an FYI, awesome control!
Michael
|
|
|
|
|
Easy, I used WindowsBlinds 5 from Stardock (http://www.stardock.com/products/windowblinds/)
|
|
|
|
|
The Alpha Gradient Panel doesn't works on my machine. Im running the .NET Framework 2.0 and SDK 2.0. It sais i need a newer version but i have already updated it. Can anyone give me a link of the newer version? Thanks, Zaegra
--Zaegra--
|
|
|
|
|
I've done a bit of VB and MSAccess over the years, but just starting with VB 2005 Express. I downloaded your zip files and unzipped them. I can open the projects(2) in Express, but still can't figure out how to add this stuff to my ToolBox, so that I may use them in any project.
When I just do Tools, and Choose ToolBox Item and then Browse, it looks for "Executable" Files and going thru all the folders in the AlphaGradient unzipped folders doesn't find any executables.
I saw a note below about "Rebuilding?" but didn't know what that really was.
So I guess I just want to plead ignorance and see if anyone can give me step-by-step instuctions on how to get this beautiful stuff in my toolbox, so that I can use it in any project I do.
PS: I love the looks of what you've done, very good work!
Thanks,
HankFrid;)
Always a work in progress!
|
|
|
|
|
First of all, you need to compile (or build) AlphaGradientPanel, which will produce a .dll file in the project\bin directory.
Then open anew one and with the Toolbox, browse, choose that dll file.
It'll add itself to the toolbox.
Cheers,
Nick
|
|
|
|
|
Sorry im a bit new to this c# thing..
I tried to add the downloaded .dll to the toolbox too and without result. You say 'rebuilding' the .dll will help? How do I do that?
-- thanks
|
|
|
|