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

C#

 
QuestionHow can I get the copy of the pdf file when it is opened on IE? Pin
svt gdwl30-Mar-09 1:52
svt gdwl30-Mar-09 1:52 
RantRe: How can I get the copy of the pdf file when it is opened on IE? Pin
musefan30-Mar-09 2:05
musefan30-Mar-09 2:05 
AnswerRe: How can I get the copy of the pdf file when it is opened on IE? Pin
Xmen Real 30-Mar-09 2:45
professional Xmen Real 30-Mar-09 2:45 
QuestionAbout .dll and User Control Proctection Pin
Isaac Gordon30-Mar-09 1:47
Isaac Gordon30-Mar-09 1:47 
AnswerRe: About .dll and User Control Proctection Pin
DaveyM6930-Mar-09 1:50
professionalDaveyM6930-Mar-09 1:50 
QuestionC# timer issue Pin
Supra230-Mar-09 1:30
Supra230-Mar-09 1:30 
AnswerRe: C# timer issue Pin
N a v a n e e t h30-Mar-09 1:35
N a v a n e e t h30-Mar-09 1:35 
Questionlisting files in C# Pin
mrithula830-Mar-09 1:13
mrithula830-Mar-09 1:13 
Hi I used the following code for listing files
int h=listBox1.SelectedIndex;
if(h==0)
{
try
                {
                    reader = new XmlTextReader("path.xml");

                    while (reader.Read())
                    {
                        switch (reader.NodeType)
                        {
                            case XmlNodeType.Text: //Display the text in each element.
                                //   Console.WriteLine(reader.Value);
                                String s1;
                                s1 = reader.Value;
                                String ss;

                                ss = listBox1.SelectedItem.ToString();
                                sss = ss + s1;
                                object o3 = (object)sss;

                                DirectoryInfo dire = new DirectoryInfo(sss);

                                //DirectoryInfo[] dirs = dire.GetDirectories();

                                if (dire.Exists)
                                {
                                    String[] folder;
                                    folder = Directory.GetDirectories(sss);
                                    foreach (string foldername in folder)
                                    {
                            DirectoryInfo di = new DirectoryInfo(foldername);
                                        if (di.Exists)
                                        {
                                            String[] files;
                              files = Directory.GetFiles(foldername, "*.exe*");

                                            //FileInfo[] fi = dire.GetFiles();

                                            foreach (String filename in files)
                                            {
                                                lvi = new ListViewItem();
                                                lvi.Text = filename;
                                                listView1.Items.Add(lvi);

                                 lvsi = new ListViewItem.ListViewSubItem();
                                 lvsi.Text = filename.Length.ToString();
                                                lvi.SubItems.Add(lvsi);
                                             }
                                             this.Controls.Add(listView1);
                                        }
                                    }
                                }
                                break;
                        }
                    }
                }
                catch (System.Exception err)
                {
                    MessageBox.Show("Error: " + err.Message);
                }   
              }
if(h==1)
{
//same as above
}         
The following line gets the selected item from listbox(C:\,D:\...)
ss = listBox1.SelectedItem.ToString();
It works for C:\.When D:\ is selected it again displays C:\ and not D:\
AnswerRe: listing files in C# Pin
musefan30-Mar-09 2:16
musefan30-Mar-09 2:16 
Questionproblem with sqldatareader Pin
prasadbuddhika30-Mar-09 1:12
prasadbuddhika30-Mar-09 1:12 
AnswerRe: problem with sqldatareader Pin
musefan30-Mar-09 1:27
musefan30-Mar-09 1:27 
AnswerRe: problem with sqldatareader Pin
NickPace30-Mar-09 6:04
NickPace30-Mar-09 6:04 
QuestionHow to programatically play a video? Pin
George_George30-Mar-09 0:46
George_George30-Mar-09 0:46 
AnswerRe: How to programatically play a video? Pin
musefan30-Mar-09 1:24
musefan30-Mar-09 1:24 
GeneralRe: How to programatically play a video? Pin
George_George30-Mar-09 1:50
George_George30-Mar-09 1:50 
GeneralRe: How to programatically play a video? Pin
musefan30-Mar-09 2:00
musefan30-Mar-09 2:00 
GeneralRe: How to programatically play a video? Pin
George_George30-Mar-09 2:14
George_George30-Mar-09 2:14 
GeneralRe: How to programatically play a video? Pin
musefan30-Mar-09 2:20
musefan30-Mar-09 2:20 
GeneralRe: How to programatically play a video? Pin
George_George30-Mar-09 2:35
George_George30-Mar-09 2:35 
QuestionUnable to copy error in C# Pin
mrithula830-Mar-09 0:34
mrithula830-Mar-09 0:34 
AnswerRe: Unable to copy error in C# Pin
Pete O'Hanlon30-Mar-09 0:39
mvePete O'Hanlon30-Mar-09 0:39 
AnswerRe: Unable to copy error in C# Pin
musefan30-Mar-09 0:39
musefan30-Mar-09 0:39 
GeneralRe: Unable to copy error in C# Pin
mrithula830-Mar-09 0:45
mrithula830-Mar-09 0:45 
Questionneed to access the value of property "SETUPEXEDIR" Pin
honeyashu30-Mar-09 0:27
honeyashu30-Mar-09 0:27 
Questionpagination of datagrid Pin
dilip51430-Mar-09 0:08
dilip51430-Mar-09 0:08 

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.