Hello guys!
I've started a new app that I need to fade two images. One of them will be the background and other will fade-in on mouse hover and fade-out on mouse left. After some search around the internet, I didn't found anything that I could use. Can you guys give me some help?

And I need nome more thing. I want to have faded borders on some images, top and bottom to be more precise. There is some way to apply a mask to the images so when I scoll them up and down their borders will look faded? If my explanation don't help, I can post an example image.

Thanks in advance!

Recommended Answers

All 7 Replies


you can go for Javascript ...

commented: I have a feeling you shouldn't be posting in a C# thread ;) -2

Inside C#? I don't see how this gonna work, and I would need to learn another programing language just for this. There's must be another way. :)

Post the image. What control are you using to show the picture? Most controls have a mouse enter and mouse leave event you can subscribe to, which you could use to trigger a timer or something to handle your fading.

I'm using the standard picture box control, I just need to make the fade transition.

Here's the image:
As you can see, its bottom is a fading green, which would mean that there's something more below it. So, as soon as I scroll down, when I reach the end of the image, that fade would dissapear. Also, as soon as I scroll down and it hide some image on the top, the fade would appear there too. Maybe I can to that overlaying one picturebox with another?

So, personally, I think you should have two further picture boxes on top of your main picture box for the "more image" notification.

The fade can be controlled using the transparency or alpha level. 255 being opaque and 0 being transparent.

Have this set to a relevant level depending on your scroll position.

The maths behind it is for you to decide =)

Hm... Interesting.
This seems to be the easiest solution. I'll try it, thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.