Click here to Skip to main content
15,913,722 members
Home / Discussions / C#
   

C#

 
QuestionAccess Database crashing on load in Vista Pin
Hitchic0528-Feb-09 17:22
Hitchic0528-Feb-09 17:22 
AnswerRe: Access Database crashing on load in Vista [modified] Pin
Douglas Troy1-Mar-09 7:18
Douglas Troy1-Mar-09 7:18 
AnswerRe: Access Database crashing on load in Vista Pin
Razvan Dimescu1-Mar-09 22:42
Razvan Dimescu1-Mar-09 22:42 
GeneralRe: Access Database crashing on load in Vista Pin
Douglas Troy2-Mar-09 7:18
Douglas Troy2-Mar-09 7:18 
QuestionMonitor and scan internet files Pin
Ghaith Hachem28-Feb-09 12:09
Ghaith Hachem28-Feb-09 12:09 
AnswerRe: Monitor and scan internet files Pin
abdul jalil1-Mar-09 3:48
abdul jalil1-Mar-09 3:48 
GeneralRe: Monitor and scan internet files Pin
Ghaith Hachem1-Mar-09 4:04
Ghaith Hachem1-Mar-09 4:04 
QuestionReading specif Excel sheet headers Pin
alvas8928-Feb-09 11:09
alvas8928-Feb-09 11:09 
AnswerRe: Reading specif Excel sheet headers Pin
Calin Tatar28-Feb-09 16:12
Calin Tatar28-Feb-09 16:12 
GeneralRe: Reading specif Excel sheet headers Pin
alvas893-Mar-09 9:08
alvas893-Mar-09 9:08 
AnswerRe: Reading specif Excel sheet headers Pin
0x3c01-Mar-09 0:03
0x3c01-Mar-09 0:03 
GeneralRe: Reading specif Excel sheet headers Pin
alvas893-Mar-09 9:12
alvas893-Mar-09 9:12 
QuestionCD Image in C# [modified] Pin
Demasoni28-Feb-09 9:54
Demasoni28-Feb-09 9:54 
AnswerRe: CD Image in C# Pin
harold aptroot28-Feb-09 10:41
harold aptroot28-Feb-09 10:41 
AnswerRe: CD Image in C# Pin
Henry Minute1-Mar-09 2:01
Henry Minute1-Mar-09 2:01 
QuestionTo display Node atrributes such that node name is added to tree? Pin
rasingh128-Feb-09 8:23
rasingh128-Feb-09 8:23 
Questionwindows version check Pin
shabya28-Feb-09 7:26
shabya28-Feb-09 7:26 
AnswerRe: windows version check Pin
harold aptroot28-Feb-09 7:30
harold aptroot28-Feb-09 7:30 
GeneralRe: windows version check Pin
0x3c028-Feb-09 8:15
0x3c028-Feb-09 8:15 
GeneralRe: windows version check Pin
harold aptroot28-Feb-09 8:42
harold aptroot28-Feb-09 8:42 
GeneralRe: windows version check Pin
shabya28-Feb-09 9:36
shabya28-Feb-09 9:36 
GeneralRe: windows version check Pin
harold aptroot28-Feb-09 10:17
harold aptroot28-Feb-09 10:17 
AnswerRe: windows version check Pin
Ravi Bhavnani28-Feb-09 8:48
professionalRavi Bhavnani28-Feb-09 8:48 
QuestionStrip progress bar using background thread while uploading file in C#? Pin
rasingh128-Feb-09 7:10
rasingh128-Feb-09 7:10 
I want to run a strip progress bar on winform using background thread while uploading a file from my hard disk.i am getting an exception on xmlDocument.Load(txtFileName.Text) saying " System.ArgumentException was unhandled by user code Message="Illegal characters in path."
public partial class TreeDisplay : Form  
    {  
        public string Filename  
        {            get { return filename; }        }  
        protected string filename;  
        //Declaring constructor of the Class  
        public TreeDisplay()  
        {  
            InitializeComponent();  
            this.Text = "Tree View of XML File";//Form Title.  
        }//TreeDisplay Constructor  
        private void initiatingTree(string nameofFile)  
        {  
            try 
            {              
                treeView1.Nodes.Clear();  
                if (xmlDocument.DocumentElement != null) treeView1.Nodes.Add(new TreeNode(xmlDocument.DocumentElement.Name));  
                //Creating TreeNode and adding the first node to it.  
                TreeNode tNodeObj = treeView1.Nodes[0];  
                                 
                XmlNode xNode = xmlDocument.DocumentElement;  
 
                //Declaring function for adding Nodes to tree View.  
                AddingNodesToTree(xNode,tNodeObj);  
                toolStripStatusLabel1.Text = "Opened file " + nameofFile;  
                treeView1.Nodes[0].Expand();  
                treeView1.CollapseAll();  
            }//try block ends  
            //Exception Handlers to catch any sort of error  
            catch (XmlException xmlex)  
            {  
                MessageBox.Show(xmlex.Message, "Error");  
            }//catch  
            catch (Exception exp)  
            {  
                txtFileName.Text = exp.Message;  
            }  
        }//initiatingTree  
private void btnBrowse_Click(object sender,EventArgs e)
        {
            bgWorker1.RunWorkerAsync();
            StripProgressBar.Value = 0;
            toolStripStatusLabel1.Text = "Browsing for a  Xml file";
            OpenFileDialog open = new OpenFileDialog();
            
            if (open.ShowDialog(this) == DialogResult.OK)
            {
                txtFileName.Text = open.FileName;
                initiatingTree(open.FileName); 
            }
            while (this.bgWorker1.IsBusy)
            {
                StripProgressBar.Increment(1);
                Application.DoEvents();
            }
        }//Browse button      
        private void bgWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            xmlDocument = new XmlDocument();
            Thread.Sleep(5000);
            xmlDocument.Load(txtFileName.Text);
            btnBrowse.Enabled = false;
        }
        private void bgworker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
         {
             StripProgressBar.Value = 100;
             if (e.Error == null)
             {
                 MessageBox.Show(xmlDocument.InnerXml, "Download Complete");
             }
             else
             {
                 MessageBox.Show("Failed to download file");                    
             }
             // Enable the Browse button and reset the progress bar.
             this.btnBrowse.Enabled = true;
             StripProgressBar.Value = 0;
             toolStripStatusLabel1.Text = "work finished processing request.";  
         }//workerCompleted  
    }// TreeDisplay Class  

Please help me in removing the exception.
Thanks..
AnswerRe: Strip progress bar using background thread while uploading file in C#? Pin
Ravi Bhavnani28-Feb-09 8:49
professionalRavi Bhavnani28-Feb-09 8:49 

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.