|
It will give a very cryptic error message that none of my customers every understood.
The fireworks will come from the user who screams at you "what the heck is this 2 point whateverthefuckitwas and how do I get it??"
|
|
|
|
|
shabya wrote: is there a way to fish the windows version as soon as i start my application ?
Imho, the only failsafe way to do this successfully on all platforms would be to write a loader app that runs on all platforms. The loader app will check the version of Windows (and the presence of other pre-requisites, if necessary) and start the real app only if everything's OK.
/ravi
|
|
|
|
|
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;
public TreeDisplay()
{
InitializeComponent();
this.Text = "Tree View of XML File";
}
private void initiatingTree(string nameofFile)
{
try
{
treeView1.Nodes.Clear();
if (xmlDocument.DocumentElement != null) treeView1.Nodes.Add(new TreeNode(xmlDocument.DocumentElement.Name));
TreeNode tNodeObj = treeView1.Nodes[0];
XmlNode xNode = xmlDocument.DocumentElement;
AddingNodesToTree(xNode,tNodeObj);
toolStripStatusLabel1.Text = "Opened file " + nameofFile;
treeView1.Nodes[0].Expand();
treeView1.CollapseAll();
}
catch (XmlException xmlex)
{
MessageBox.Show(xmlex.Message, "Error");
}
catch (Exception exp)
{
txtFileName.Text = exp.Message;
}
}
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();
}
}
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");
}
this.btnBrowse.Enabled = true;
StripProgressBar.Value = 0;
toolStripStatusLabel1.Text = "work finished processing request.";
}
}
Please help me in removing the exception.
Thanks..
|
|
|
|
|
rasingh1 wrote: i am getting an exception
Where?
/ravi
|
|
|
|
|
Hi Ravi,
i have written it in my Text that i am getting an exception in this line xmlDocument.Load(txtFileName.Text); Can you help me in removing this exception.
Thanks & Regards
Rach
|
|
|
|
|
Try checking the inner exception or view the file in IE to find the offending line. Looks like the file may contain badly formed XML.
/ravi
|
|
|
|
|
Hi Ravi,
How to check inner exception? The message in exception is "Illegal characters in path".
If i open this xml file without using background worker then it is showing me the file nicely in treeview without any exception.
But i want to add a progress bar (and background worker if possible) to tell the user that the file is being in the process of display in treeview.
The xml file does not contain any illegal characters ,it is in the right format,i checked it.
Otherwise can you tell me how i can run a progress bar on winform to tell the user to wait till the xml file is being uploaded in treeview on winform.If possible can u provide me a link or part of code to do this function?I searched a lot on net then i have written this part of code.
If any help is provided that will be appreciated.
Waiting to hear from you..
Thanks
|
|
|
|
|
rasingh1 wrote: How to check inner exception?
See the properties of the Exception class. Although in this case, I suspect it's null .
rasingh1 wrote: The message in exception is "Illegal characters in path".
Seems like the filespec passed to xmlDocument.Load() contains illegal characters.
/ravi
|
|
|
|
|
How to check this out??
|
|
|
|
|
rasingh1 wrote: How to check this out??
What do you mean by "this"?
/ravi
|
|
|
|
|
i mean these.....
properties of the Exception class. Although in this case, I suspect it's null.
Seems like the filespec passed to xmlDocument.Load() contains illegal characters.
|
|
|
|
|
Hi,
Is there any options provided by .Net framework to implement caching effectively? I want to capture files in that for some time.
Thanks in advance ...
|
|
|
|
|
Isn't the file caching that Windows does enough?
|
|
|
|
|
I know this may not be the appropriate place for me to ask about this quesiton, but I don't know
where can I ask this,I am really confused with the default page for the Html help workshop, I do believe someone who has used HTML help workshop can give me one hint:
I am using html help workshop to create the .chm for one c# application.
I try to set the default page by change "project options" and set "default file", but it does not work.
when I open the .chm and it always display "This program cannot display the webpage" on the first page. it does not display the default page I set. I don't know the reason.
by the way, except this problem, .chm works fine.
anyone has used html help workshop and please give me one hint for it.
Many thanks!!
|
|
|
|
|
Seraph_summer wrote: "This program cannot display the webpage"
This is a well known problem. Unfortunately, it is so long since I used Help 2.0 that I cannot remember the solution.
What I did do however is to google "This program cannot display the webpage" Help 2.0 and I got loads of relevant hits.
Go on, give it a try. You know you want to.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
hi , how to do the custom deployment of vb.net windows applications project . for example after completing deployment project application , when we install .exe file i want to show two options
.custom install
.typical install
after when i click custom install it should be showing modules but i cont see modules how to add modules in custom installation .
please send me step by step how to custom install deployment of c#.net windows application.
|
|
|
|
|
|
thanks for giving url , its very usefull
|
|
|
|
|
|
Hi,
I've generated a report using Matrix control in a C# win application.
I want to display sum of the values of a column at the end. I request any one who knows this to help me in this task. I've done for a TABLE control by adding table footer. Now I need it for matrix
Thanks in advance
|
|
|
|
|
How to watch on directory let say "C:\windows\temp". I want to log; by whom and when it is accessed , some thing new created.
Thanks.
|
|
|
|
|
Look in the Filesystemwatcher class.
Programming is like Mathematics… you take ONE step at the time!
|
|
|
|
|
Hi.
Is there a way to log which process has accessed/changed a file?
I looked at the FileSystemWatcher class, but it dos not tell which process.
Programming is like Mathematics… you take ONE step at the time!
|
|
|
|
|
I found the solution
I'm drawing a gradient border for a control, everything is drawn but corners.
Here[^] is the screenshot, I tried to draw on top left corner but its looking odd.
Rectangle topLeftRect = new Rectangle(0, 0, borderThickness, borderThickness);
Rectangle topRect = new Rectangle(borderThickness, 0, this.Width - (borderThickness * 2), borderThickness);
Rectangle botRect = new Rectangle(borderThickness, this.Height - borderThickness - 1, this.Width - (borderThickness * 2), borderThickness);
Rectangle leftRect = new Rectangle(0, borderThickness, borderThickness, this.Height - (borderThickness * 2));
Rectangle rightRect = new Rectangle(this.Width - borderThickness - 1, borderThickness, borderThickness, this.Height - (borderThickness * 2));
e.Graphics.FillRectangle(new LinearGradientBrush(topRect, Color.Transparent, Color.Gray, 90, false), topRect);
e.Graphics.FillRectangle(new LinearGradientBrush(botRect, Color.Transparent, Color.Gray, 270, false), botRect);
e.Graphics.FillRectangle(new LinearGradientBrush(leftRect, Color.Transparent, Color.Gray, 0, false), leftRect);
e.Graphics.FillRectangle(new LinearGradientBrush(rightRect, Color.Transparent, Color.Gray, 180, false), rightRect);
e.Graphics.FillRectangle(new LinearGradientBrush(topLeftRect, Color.Transparent, Color.Gray, 35, false), topLeftRect);
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
modified on Saturday, February 28, 2009 7:47 AM
|
|
|
|
|
Hi All,
I've got a Listview control on a windows forms and it is set to details view, shows full grid lines - so that it looks like a grid. I've three columns in the list view and have 10 rows of data. My problem is, I need a way so that when the user mouse cursor is over a particular cell of data, I want a popup (almost like a tooltip) to be displayed. Once my mouse cursor is removed from over the cell, the popup should automatically close down. Of course, this popup, will have a lot of other prepopulated data within it.
Is this possible with C#, Windows Forms? If so, can you provide some ideas on how I might go about do this? I do see this on some web site, but have never seen this on a windows forms application before.
Many thanks,
Jim
|
|
|
|
|