|
It seems to be a read only property.
|
|
|
|
|
Following a link from that doc, I found this:
(reader is an instance of XmlReader)
reader.WhitespaceHandling=WhitespaceHandling.Significant
|
|
|
|
|
|
Load that XML you have into the DOM, using the XmlDocument class like this...
string XML="<this is="" your="" text="" xml="">";
//now load it into the dom
XmlDocument doc=new XmlDocument();
doc.Load(new StringReader(XML));
//Now it's in the DOM, just save it as an XmlNode
XmlNode node=doc.SelectSingleNode("a");
now just go
textBox.Text=node.OutterXml;
and there you have it. I just typed this out of my head so there might be small errors, but that's the general idea.
/\ |_ E X E GG
|
|
|
|
|
i need a textbox with body transparent.
I've found one here on codeproject.com but it constain some bug.
Can you show me another one?
Tnx.
|
|
|
|
|
Possible approaches
1. try to fix the bug
2. write to the author about the bug, first checking the forum on the article for prior reports
3. keep looking for more free code instead of looking at the partially working code you have in front of you, in case you may learn something along the way.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'm beginer and I'd like to draw cube or sizalble voxel with DirectX.
Please help me!!!
|
|
|
|
|
If you have the DX SDK, you have samples that do this, and if you don't, you can't use DX yet anyhow.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'm trying to implement an error report in my program so that when it crashes it pops up a dialog that allows you to fill in some information and then send it along through email. The problem that I'm having is when I debug the program in VS it crashes gracefully, just like it's supposed to. But when I run it as a standalone .exe it just errors as if there is no try/catch statement. This is what I have for my Main function. If there are any suggestions please let me know.
<br />
static void Main() <br />
{<br />
try<br />
{<br />
System.Windows.Forms.Application.EnableVisualStyles();<br />
System.Windows.Forms.Application.Run(new frmMDI());<br />
}<br />
catch(System.Exception e)<br />
{<br />
System.Windows.Forms.Application.Run(new frmErrorReport(e));<br />
}<br />
}<br />
--
There are 10 kinds of people. Those who understand binary and those who don't.
|
|
|
|
|
Put a messagebox showing the exception message as the first line of the catch. Perhaps in release mode, your debug dialog is throwing it's own exception, causing this problem ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I've already tried that and it doesn't even hit the dialog. When I run it in 'release mode' it won't even hit the 'end of try' dialog. It just errors. This is what I had.
<br />
static void Main() <br />
{<br />
try<br />
{<br />
System.Windows.Forms.Application.EnableVisualStyles();<br />
System.Windows.Forms.Application.Run(new frmMDI());<br />
System.Windows.Forms.MessageBox.Show("end of try");<br />
}<br />
catch(System.Exception e)<br />
{<br />
System.Windows.Forms.MessageBox.Show("start of catch");<br />
System.Windows.Forms.Application.Run(new frmErrorReport(e));<br />
System.Windows.Forms.MessageBox.Show("end of catch");<br />
}<br />
}<br />
--
There are 10 kinds of people. Those who understand binary and those who don't.
|
|
|
|
|
Fair enough, just checking assumptions. Does the error occur in both places ? i.e. if you deliberatly divide by zero, does it throw in debug/crash in release ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I deliberatly try to set an int equal to a textbox string. And of course it throws 'Input string was not in a correct format.' When I do this in debug mode it catches the error, shows my dialog and everything is fine. But if I do the same proceedure in release mode I get the dafult .NET error dialog and it doesn't show my dialog.
Rob
--
There are 10 kinds of people. Those who understand binary and those who don't.
|
|
|
|
|
That is really weird. If it were me, I'd reinstall the framework, b/c it just shouldn't act that way, I don't believe.
I certainly put base level try/catches in a lot of my code, so I can handle exceptions gracefully, just like you're doing here, without this problem.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Okay, I tried running my program on a couple different computers and they all had the same result; it would fatal error instead of using my error report. Does it matter that I am using an MDI form with child forms? Maybe it's crapping out because a child form is erroring but then that doesn't explain why it works in debug mode and not in release. Any suggestions?
Rob
--
There are 10 kinds of people. Those who understand binary and those who don't.
|
|
|
|
|
Ah yes, that behaviour is really a nuisance. I've come across it some time ago and had a discussion with someone from M$ in some newsgroups, but he didn't tell why .NET behaves like this.
Basically, it's the same effect when you get when you encapsulate a ShowDialog() in a try/catch.
When you run the app from VS.NET, the exception is caught, when you start the application from outside you get the unhandled exception dialog.
To fix the problem you'll have to add a ThreadException handler to your app and then rethrow the exception:
static void Main()
{
try
{
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
Application.Run(new Form1());
}
catch (Exception ex)
{
MessageBox.Show("Exception caught in Main:\n"+ex.ToString());
}
}
private static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
{
throw e.Exception;
}
Hope this helps,
mav
|
|
|
|
|
Thank You! That worked like a charm.
Thanks,
Rob Tomson
--
There are 10 kinds of people. Those who understand binary and those who don't.
|
|
|
|
|
I have been fooling around with the Windows Media Player COM component. What I am trying to do is have the playlist be tied to a listbox from which they can add/remove and play songs. The problem I am having is that I cannot find a way to change the internal playlist selection in the Windows Media Player component. If I simply set currentMedia, then the internal playlist disappears. Anyone know a solution?
|
|
|
|
|
I had success maintaining my own playlist, and catching the events to tell me when to play the next file. I had no success building playlists in WMP.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have worked around the WMP playlist but, as suggested above, maintaining the events externally. I places buttons on top of the WMP control to simulate the Next and Prev buttons (viz. screenshot, extract, overlay). If anyone is interested in the code I'd be happy to share. I have the next/prev working as well as auto-playing the next file in the playlist. Going to be working on randomizing playback soon.
|
|
|
|
|
i'm trying to create a user control that uses the MouseDown event, problem is when the user uses the control and edit this function for it his function is executed first instead of my own original MouseDown function.
is there a way to control/change the order of this events on run time?
|
|
|
|
|
Hi,
I have a DataGrid bound to a DataTable. I used the following code to bind the DataTable,
//
//Set the datasource of the Grid
//
this.dataGridPCUD.DataSource = this.dataTable;
There is a save button that user clicks to save the information. The problem is that when the user
makes changes and clicks Save, the information from the last cell of the GRID is not seen by the
DataTable.
I used the following code to get the changes
CurrencyManager currencyManager = (CurrencyManager) this.dataGridPCUD.BindingContext[this.dataTable];
if (currencyManager != null)
{
currencyManager.EndCurrentEdit();
currencyManager. Refresh();
}
DataTable subDataTable = this.dataTable.GetChanges(DataRowState.Modified);
The heilighted line returns null. But when I check the new value in the DataTable, I see the modifies value.
Everything works fine if the uses tabs out before saving.
Please advise.
Thanks and Regards,
Alomgir Miah
|
|
|
|
|
Hi! i was wondering how to display all the properties for an AD object based on one of it's properties? I'm trying to show a user all there properties based on their NTID (username).
Any help would be great!
joel
|
|
|
|
|
i need to delete during the uninstall of my application a directory if exists and regstrykeys created by another my software installed on the pc.
How can i do?
Is it possible?
|
|
|
|
|
Hi All
I want to show the XML file nodes in a tree view for selection, and then the selected nodes to write in another XML file.
Please Guid me if any one know these things.
Best regards
INAM UL HAQ
|
|
|
|