I swear this code worked a few minutea ago...but now it is coming up with the Parameter is not valid error. What am I missing here?
sigpic is a public local variable.

private void SaveFile(string fileName, byte[] bytes)
        {
            //MessageBox.Show("Saving file '" + fileName + "' of length " + bytes.Length + " bytes");
            try
            {
                using (FileStream file = new FileStream(fileName, FileMode.OpenOrCreate))
                {
                    //MessageBox.Show(file.Name);
                    //file.Write(bytes, 0, bytes.Length);
                    sigpic = Image.FromStream(file);
                    file.Close();
                    
                }
              
            }
            catch (Exception e)
            {
                MessageBox.Show("Save error: " + e.Message);
            }
        }

Well I found a work around to my problem, and it seems pretty solid, so I won't need to worry about the error. I still do need help with using LDAP or getting an email address from active directory...so if anyone knows anything about that respond in the thread:
http://www.daniweb.com/forums/thread201009.html

Be a part of the DaniWeb community

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