Skip to content

GUI with C#

Nick Tans

Asked Feb 23, 2012, 2:28 PM EST1 answer
Share
LinkedInX
Hi,

The project that I am working on, needs a simple GUI where inputs are given, and processing happens on that input and output is written in a separate text file. Can someone suggest how to implement the GUI (is it Win Forms?) in C#? I have been doing C++ for 5 years now and C# for 1 year, but I am new to C# GUI programming.

Thanks,
-Nick

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Senthilkumar
    0
    Hi Nick,

    You can select the windows application through the new project in the file menu.

    The windows application has forms where you can place the control by drag and drop (WYSIWYG).

    You can drag the Textbox for get the input and you can drag the button for action.

    The file processing is well supported and you can use the System.IO.

    There are many ways to create the File.
    You can use the StreamWriter class.

    StreamWriter sw = new StreamWriter(@"c:\test.txt");
    sw.WriteLine(txtInput.Text);
    sw.Close();

    This is an example. If you want to append the text then you can FileStream to set the mode.

    Hope this will help you.
    0