Change png color
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Change png color

  1. #1
    Join Date
    Mar 2014
    Posts
    3

    Change png color

    For MS Dynamich I have created Treview with icons. I can't finde solutionst how can I change picture color - this is by user definde with hex code (#FF00FF - example)


    hire is code
    Code:
            protected override Control CreateControl()
            {
                           
                treeView.Location = new Point(12, 12);            
                treeView.Height = 430;
                treeView.Font = new Font("Verdena", 9, FontStyle.Bold);
                treeView.BorderStyle = BorderStyle.None;
                treeView.MinimumSize = new Size(50, 50);
                treeView.MaximumSize = new Size(400, Int32.MaxValue);
                treeView.HideSelection = false;
                treeView.CheckBoxes = true;
                treeView.DoubleClick += treeView_DoubleClick;
                treeView.AfterSelect += treeView_AfterSelect;            
                treeView.AfterCheck += treeView_checkBox;
                treeView.BeforeCheck += treeView_BeforeCheck;
    
                Bitmap Bmp = new Bitmap(1,1);
                imgList.Images.Add("pic0", Bmp);
               
                imgList.Images.Add("pic1", Image.FromFile("C:\\Program Files (x86)\\Microsoft Dynamics NAV\\70\\RoleTailored Client\\Add-ins\\pic1.png"));
                imgList.Images.Add("pic2", Image.FromFile("C:\\Program Files (x86)\\Microsoft Dynamics NAV\\70\\RoleTailored Client\\Add-ins\\pic2.png"));
                imgList.Images.Add("pic3", Image.FromFile("C:\\Program Files (x86)\\Microsoft Dynamics NAV\\70\\RoleTailored Client\\Add-ins\\pic3.png"));
                imgList.Images.Add("pic4", Image.FromFile("C:\\Program Files (x86)\\Microsoft Dynamics NAV\\70\\RoleTailored Client\\Add-ins\\pic4.png"));
                imgList.Images.Add("pic5", Image.FromFile("C:\\Program Files (x86)\\Microsoft Dynamics NAV\\70\\RoleTailored Client\\Add-ins\\pic5.png"));
                imgList.Images.Add("pic6", Image.FromFile("C:\\Program Files (x86)\\Microsoft Dynamics NAV\\70\\RoleTailored Client\\Add-ins\\pic6.png"));
                imgList.Images.Add("pic7", Image.FromFile("C:\\Program Files (x86)\\Microsoft Dynamics NAV\\70\\RoleTailored Client\\Add-ins\\pic7.png"));
                imgList.Images.Add("pic8", Image.FromFile("C:\\Program Files (x86)\\Microsoft Dynamics NAV\\70\\RoleTailored Client\\Add-ins\\pic8.png"));
                imgList.Images.Add("pic9", Image.FromFile("C:\\Program Files (x86)\\Microsoft Dynamics NAV\\70\\RoleTailored Client\\Add-ins\\pic9.png"));
                imgList.Images.Add("pic10", Image.FromFile("C:\\Program Files (x86)\\Microsoft Dynamics NAV\\70\\RoleTailored Client\\Add-ins\\pic10"));
                treeView.ImageList = imgList;
    
                return treeView;
            }
    Last edited by HanneSThEGreaT; July 6th, 2014 at 03:40 PM.

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,098

    Re: Change png color

    Perhaps use the SetPixel API

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center