Click here to Skip to main content
15,891,657 members
Home / Discussions / C#
   

C#

 
Question[Message Deleted] Pin
hkjghkj123-Jan-09 23:49
hkjghkj123-Jan-09 23:49 
AnswerRe: Image with Ellipse Path Pin
DaveyM6924-Jan-09 0:32
professionalDaveyM6924-Jan-09 0:32 
Question'dropdown listbox' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value Pin
dhavaldpatel23-Jan-09 23:00
dhavaldpatel23-Jan-09 23:00 
AnswerRe: 'dropdown listbox' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value Pin
WebMaster26-Jan-09 4:52
WebMaster26-Jan-09 4:52 
Questionsome C# question Pin
E_Gold23-Jan-09 22:47
E_Gold23-Jan-09 22:47 
AnswerRe: some C# question Pin
N a v a n e e t h23-Jan-09 23:14
N a v a n e e t h23-Jan-09 23:14 
QuestionSecurity information in Web Pin
trinm198723-Jan-09 22:29
trinm198723-Jan-09 22:29 
QuestionSemi-Transparent icons in ListView Pin
Ankit Rajpoot23-Jan-09 21:28
Ankit Rajpoot23-Jan-09 21:28 
Hello everyone,

I'm developing an application that is similar to Windows Explorer. I'm using a ListView control to display files and folders along with their icons. Now, icons for files can be retrieved using standard shell functions ExtranctIcon and ExtractIconEx. But my question is that how can I get that translucent effect as used by Windows Explorer for hidden and system files.

I searched google and found the following code snippet:

public static Image SetImageOpacity(Image imagePic, float imageOpacity)
        {
            Bitmap bmpPic = new Bitmap(imagePic.Width, imagePic.Height);
            Graphics gfxPic = Graphics.FromImage(bmpPic);
            ColorMatrix cmxPic = new ColorMatrix();
            cmxPic.Matrix33 = imageOpacity;

            ImageAttributes iaPic = new ImageAttributes();
            iaPic.SetColorMatrix(cmxPic, ColorMatrixFlag.Default, ColorAdjustType.Bitmap);
            gfxPic.DrawImage(imagePic, new Rectangle(0, 0, bmpPic.Width, bmpPic.Height), 0, 0, imagePic.Width, imagePic.Height, GraphicsUnit.Pixel, iaPic);
            gfxPic.Dispose();

            return bmpPic;
        }


Now my code calls this method as follows:

lViewVFSBrowser.LargeImageList.Images.Add(imageKey, SetImageOpacity(iconL.ToBitmap(), (float)0.7));


but all I get in return is an icon with a bluish background as shown here:

http://www.geocities.com/ankit_incredible_2006/problem.JPG[^]
AnswerRe: Semi-Transparent icons in ListView Pin
DaveyM6924-Jan-09 2:20
professionalDaveyM6924-Jan-09 2:20 
GeneralRe: Semi-Transparent icons in ListView Pin
Ankit Rajpoot24-Jan-09 3:29
Ankit Rajpoot24-Jan-09 3:29 
GeneralRe: Semi-Transparent icons in ListView Pin
DaveyM6924-Jan-09 4:48
professionalDaveyM6924-Jan-09 4:48 
GeneralRe: Semi-Transparent icons in ListView Pin
DaveyM6924-Jan-09 4:57
professionalDaveyM6924-Jan-09 4:57 
GeneralSemi-Transparent icons in ListView (Yoooooohooooooo got it working now) Pin
Ankit Rajpoot24-Jan-09 4:51
Ankit Rajpoot24-Jan-09 4:51 
GeneralRe: Semi-Transparent icons in ListView (Yoooooohooooooo got it working now) Pin
DaveyM6924-Jan-09 5:01
professionalDaveyM6924-Jan-09 5:01 
GeneralRe: Semi-Transparent icons in ListView (Yoooooohooooooo got it working now) Pin
DaveyM6924-Jan-09 5:14
professionalDaveyM6924-Jan-09 5:14 
GeneralRe: Semi-Transparent icons in ListView (Yoooooohooooooo got it working now) Pin
Ankit Rajpoot24-Jan-09 5:55
Ankit Rajpoot24-Jan-09 5:55 
QuestionLinkintwo forms in project in win app Pin
MontSon23-Jan-09 21:09
MontSon23-Jan-09 21:09 
AnswerRe: Linkintwo forms in project in win app Pin
DaveyM6923-Jan-09 23:43
professionalDaveyM6923-Jan-09 23:43 
GeneralRe: Linkintwo forms in project in win app Pin
Wendelius24-Jan-09 0:21
mentorWendelius24-Jan-09 0:21 
GeneralRe: Linkintwo forms in project in win app Pin
nelsonpaixao24-Jan-09 5:50
nelsonpaixao24-Jan-09 5:50 
GeneralRe: Linkintwo forms in project in win app Pin
DaveyM6924-Jan-09 6:00
professionalDaveyM6924-Jan-09 6:00 
QuestionThread was being aborted. Pin
waitsunny23-Jan-09 20:53
waitsunny23-Jan-09 20:53 
AnswerRe: Thread was being aborted. Pin
EliottA23-Jan-09 20:57
EliottA23-Jan-09 20:57 
GeneralRe: Thread was being aborted. Pin
anishkannan23-Jan-09 21:08
anishkannan23-Jan-09 21:08 
GeneralRe: Thread was being aborted. Pin
#realJSOP23-Jan-09 22:17
mve#realJSOP23-Jan-09 22:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.