Click here to Skip to main content
15,887,886 members
Home / Discussions / C#
   

C#

 
GeneralRe: Application.Run(new Form1()); Error Code Pin
Blekk13-Nov-06 6:30
Blekk13-Nov-06 6:30 
QuestionConcurrency violation Pin
Nadia Monalisa13-Nov-06 5:55
Nadia Monalisa13-Nov-06 5:55 
AnswerRe: Concurrency violation Pin
ednrgc13-Nov-06 9:01
ednrgc13-Nov-06 9:01 
GeneralRe: Concurrency violation Pin
Nadia Monalisa13-Nov-06 13:09
Nadia Monalisa13-Nov-06 13:09 
GeneralRe: Concurrency violation Pin
ednrgc14-Nov-06 2:50
ednrgc14-Nov-06 2:50 
GeneralRe: Concurrency violation Pin
Nadia Monalisa14-Nov-06 3:35
Nadia Monalisa14-Nov-06 3:35 
Questionhow to use saveFileDialog Pin
veluru krishna13-Nov-06 5:27
veluru krishna13-Nov-06 5:27 
AnswerRe: how to use saveFileDialog Pin
Jamie Nordmeyer13-Nov-06 5:38
Jamie Nordmeyer13-Nov-06 5:38 
SaveFileDialog dlg = new SaveFileDialog();
dlg.Filter = "Text Files|*.txt|Comma Seperated Files|*.csv|All Files|*.*";
dlg.InitialDirectory = @"C:\";
if (dlg.ShowDialog() == DialogResult.OK)
{
   using (System.IO.StreamWriter writer = new System.IO.StreamWriter(dlg.FileName))
   {
      writer.Write(txtContent.Text);
      writer.Flush();
   }
}


The Filter property is a pipe (vertical bar) separated list of file type descriptions and file type filters that must be paired. So in the above example, when the Save File Dialog is shown, the 'File Types' drop down will contain 3 entries: one for Text Files, which will expect a .txt extension, one for Comma Seperated Values, which will expect a .csv extension, and one for All Files, which will take any extension. The OpenFileDialog class works in the same way.

Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan
Portland, Oregon, USA

GeneralRe: how to use saveFileDialog Pin
Blekk13-Nov-06 6:35
Blekk13-Nov-06 6:35 
GeneralRe: how to use saveFileDialog Pin
Jamie Nordmeyer13-Nov-06 6:40
Jamie Nordmeyer13-Nov-06 6:40 
GeneralRe: how to use saveFileDialog Pin
Blekk13-Nov-06 6:46
Blekk13-Nov-06 6:46 
GeneralRe: how to use saveFileDialog Pin
Jamie Nordmeyer13-Nov-06 6:52
Jamie Nordmeyer13-Nov-06 6:52 
GeneralRe: how to use saveFileDialog Pin
Blekk13-Nov-06 6:58
Blekk13-Nov-06 6:58 
GeneralRe: how to use saveFileDialog Pin
Jamie Nordmeyer13-Nov-06 7:01
Jamie Nordmeyer13-Nov-06 7:01 
GeneralRe: how to use saveFileDialog Pin
Blekk13-Nov-06 6:47
Blekk13-Nov-06 6:47 
GeneralRe: how to use saveFileDialog Pin
Nadia Monalisa13-Nov-06 6:53
Nadia Monalisa13-Nov-06 6:53 
GeneralRe: how to use saveFileDialog Pin
Jamie Nordmeyer13-Nov-06 7:03
Jamie Nordmeyer13-Nov-06 7:03 
GeneralRe: how to use saveFileDialog Pin
veluru krishna14-Nov-06 5:21
veluru krishna14-Nov-06 5:21 
GeneralRe: how to use saveFileDialog Pin
Jamie Nordmeyer14-Nov-06 5:43
Jamie Nordmeyer14-Nov-06 5:43 
QuestionSending messages over LAN Pin
jeweladdict13-Nov-06 5:20
jeweladdict13-Nov-06 5:20 
AnswerRe: Sending messages over LAN Pin
Robert Rohde13-Nov-06 5:35
Robert Rohde13-Nov-06 5:35 
GeneralRe: Sending messages over LAN Pin
jeweladdict13-Nov-06 5:43
jeweladdict13-Nov-06 5:43 
AnswerRe: Sending messages over LAN Pin
Blekk13-Nov-06 7:46
Blekk13-Nov-06 7:46 
AnswerRe: Sending messages over LAN Pin
Roman Rodov13-Nov-06 15:41
Roman Rodov13-Nov-06 15:41 
AnswerRe: Sending messages over LAN Pin
lmoelleb13-Nov-06 23:55
lmoelleb13-Nov-06 23:55 

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.