C# 2005-Windows Application-imagelist settings problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wolffy
    New Member
    • Oct 2007
    • 1

    #1

    C# 2005-Windows Application-imagelist settings problems

    okay heres my problem;
    i want to add image K to a imagelist, thats easy. The hard part is that the imagelist was made in Application Settings. **I made the imagelist in application settings so i could eventually add in code which would make its value saved when the form closes** But every time i use something like this
    Code:
    image k = toolstrip1.backgroundimage;
    Settings.Default.kill.Images.Add(k);
    **kill is the name of the imagelist**
    i get this error which says- "Null reference was unhandled". The problem isnt with the image k, its with the kill imagelist.
    In the application settings, i cant seem to even give imagelist a value and it seems to me the only time i can even give it a value is before the image starts.
    So how can i add a value to the imagelist, without getting this error or any error
    Last edited by wolffy; Oct 18 '07, 08:40 PM. Reason: Forgot to add
Working...