Click here to Skip to main content
15,899,314 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to read files using FolderBrowserDialog and save its contents into sql database table Pin
0x3c027-Mar-09 4:39
0x3c027-Mar-09 4:39 
AnswerRe: How to read files using FolderBrowserDialog and save its contents into sql database table Pin
Giorgi Dalakishvili26-Mar-09 22:38
mentorGiorgi Dalakishvili26-Mar-09 22:38 
QuestionCall event after closing my last form but not the main form? Pin
lixid26-Mar-09 19:02
lixid26-Mar-09 19:02 
AnswerRe: Call event after closing my last form but not the main form? Pin
King Julien26-Mar-09 19:35
King Julien26-Mar-09 19:35 
GeneralRe: Call event after closing my last form but not the main form? Pin
lixid26-Mar-09 19:56
lixid26-Mar-09 19:56 
GeneralRe: Call event after closing my last form but not the main form? Pin
King Julien26-Mar-09 20:18
King Julien26-Mar-09 20:18 
GeneralRe: Call event after closing my last form but not the main form? Pin
lixid27-Mar-09 20:09
lixid27-Mar-09 20:09 
QuestionNeed help with some basic problems Pin
RogerLum26-Mar-09 17:37
RogerLum26-Mar-09 17:37 
Hi programmers,

I'm working a software called VeriLook in C#. I had some problems saving the image to a file after capturing the image.


namespace prac_8
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

        }
        private void button1_Click(object sender, EventArgs e)
        {

            CameraMan cameraMan = new CameraMan(null);
            Console.WriteLine("Found cameras (id, default resolution, automatic settings):");

            foreach (Camera camera in cameraMan.Cameras)
            {
                CameraVideoFormat videoFormat = camera.VideoFormat;
                Console.Write("\t{0}, {1}x{2}x{3:f2}, {4}",
                camera.ID, videoFormat.FrameWidth, videoFormat.FrameHeight,
                videoFormat.FrameRate, camera.AutomaticSettings);
                camera.StartCapturing();
                NImage image = camera.GetCurrentFrame();
                Bitmap bm = image.ToBitmap();
                videoControl.Image = new Bitmap(bm);

            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Bitmap bm = videoControl.Image;
            NImage image = NImage.FromBitmap(bm);
            NGrayscaleImage grayscale = (NGrayscaleImage)NImage.FromImage(NPixelFormat.Grayscale, 0, image);
            NLExtractor extractor = new NLExtractor();
            NleDetectionDetails details;
            NleExtractionStatus extractionStatus;
            NLTemplate template = extractor.Extract(grayscale, out details, out extractionStatus);

            if (details.FaceAvailable && details.EyesAvailable)
            {
                MessageBox.Show("Found face and eyes!");
            }
            if (extractionStatus != NleExtractionStatus.TemplateCreated)
            {
                MessageBox.Show("Extraction failed!");
                return;
            }

            NLTemplate compressed = extractor.Compress(template);
            if (compressed == null)
            {
                Console.WriteLine("Face template compression failed!");
                return;
            }

            BinaryWriter writer = new BinaryWriter(new FileStream(args[0], FileMode.OpenOrCreate, FileAccess.Write));     //line 81
            writer.Write(compressed.Save());
            writer.Close();


        }



    }
}






Basically this is what i have
I had encountered an error with
"The name 'args' does not exist in the current context." line 81
what does it mean? and what can i do to solve it? what should i put down?
thanks!~
AnswerRe: Need help with some basic problems Pin
Dave Kreskowiak26-Mar-09 18:14
mveDave Kreskowiak26-Mar-09 18:14 
GeneralRe: Need help with some basic problems Pin
RogerLum26-Mar-09 19:10
RogerLum26-Mar-09 19:10 
GeneralRe: Need help with some basic problems Pin
King Julien26-Mar-09 19:39
King Julien26-Mar-09 19:39 
GeneralRe: Need help with some basic problems Pin
Tom Deketelaere26-Mar-09 22:31
professionalTom Deketelaere26-Mar-09 22:31 
GeneralRe: Need help with some basic problems Pin
Dave Kreskowiak27-Mar-09 1:26
mveDave Kreskowiak27-Mar-09 1:26 
AnswerRe: Need help with some basic problems Pin
12Code26-Mar-09 19:41
12Code26-Mar-09 19:41 
GeneralRe: Need help with some basic problems Pin
RogerLum26-Mar-09 20:07
RogerLum26-Mar-09 20:07 
GeneralRe: Need help with some basic problems Pin
Christian Graus26-Mar-09 21:57
protectorChristian Graus26-Mar-09 21:57 
GeneralRe: Need help with some basic problems Pin
Tom Deketelaere26-Mar-09 22:34
professionalTom Deketelaere26-Mar-09 22:34 
AnswerRe: Need help with some basic problems Pin
benjymous27-Mar-09 0:49
benjymous27-Mar-09 0:49 
Questionusing SendMessage win32 things Pin
jeanbern26-Mar-09 16:03
jeanbern26-Mar-09 16:03 
AnswerRe: using SendMessage win32 things Pin
Dave Kreskowiak26-Mar-09 18:12
mveDave Kreskowiak26-Mar-09 18:12 
AnswerRe: using SendMessage win32 things Pin
Judah Gabriel Himango26-Mar-09 18:15
sponsorJudah Gabriel Himango26-Mar-09 18:15 
GeneralRe: using SendMessage win32 things Pin
jeanbern26-Mar-09 18:39
jeanbern26-Mar-09 18:39 
Questioncast to interface and then pass as ref Pin
devvvy26-Mar-09 14:18
devvvy26-Mar-09 14:18 
AnswerRe: cast to interface and then pass as ref Pin
_Maxxx_26-Mar-09 19:31
professional_Maxxx_26-Mar-09 19:31 
GeneralRe: cast to interface and then pass as ref Pin
devvvy26-Mar-09 19:39
devvvy26-Mar-09 19:39 

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.