|
Do any of the XmlReader classes provide the ability to read comments from the file, or will I need to write a custom parser to do this?
I'm refering to this style of comment:
<-- Comment -->
|
|
|
|
|
Yes, every XmlReader can read XML comments. Take a look at the XmlReader.Read()[^] method. The node type will indicate that it's a comment and you only have to get the Value .
Logifusion[^]
|
|
|
|
|
Thats not a valid Xml comment, valid Xml comments have an exclamation mark after the opening brace
<!-- Comment -->
---
How to get answers to your questions[^]
-- modified at 11:10 Thursday 20th July, 2006
|
|
|
|
|
|
Hi, does anyone know how to create a password filter using C#? I've seen the SDK docs and looked at the sample, but I really need to create it in a managed environment (despite Microsofts recommendations).
Thanks in advance!
Kieron
|
|
|
|
|
What do you mean by password filter?
|
|
|
|
|
Hi,
Check: http://windowssdk.msdn.microsoft.com/en-us/library/ms721882.aspx
|
|
|
|
|
I understand, but can't offer anything to you, sorry.
|
|
|
|
|
Hiho!
I would like to know how (if at all possible) I can prevent an alert() box to show up.
I am using the AxWebBrowser to display an HTML. Works great, but if there is a javascript in the HTML showing an alert(), the application is waiting for the user to click on that alert. I don't want to disable the javascript, just the alert box.
Thx,
GhoulLord
|
|
|
|
|
|
Thank you for the information, but I have problems to find what I am looking for.
I had a look at 05_CIF_Browsing.DOC. But unfortunately I found nothing that would solve my problem. Could you please give me a more precise hint where to look?
Thx,
GhoulLord
|
|
|
|
|
Not really, sorry - I thought it was outlined in that document.
Essentailly, this is part of the Local Machine Lockdown stuffs from XP SP2. If you search the MSDN for that phrase "Local Machine Lockdown", you should find some relevant
information ...
|
|
|
|
|
Hi,
I'm trying to create a MDI window which has a SplitContainer, on the left SplitterPanel a treeview and when a node is double clicked a Form should open in the right SplitterPanel. I'm trying to make the Form a child of the MDI Window and also display it within the right SplitterPanel. The problem is that, when I double click the TreeView node, the Form which is added to the right Splitter Panel is not added as a child of the MDI and it also does not have focus. I can move the Form window and access its controls, but it does not retain focus. This is the code I used to add the Form ( done within the Constructor)
// g_mdiform is a instance of the MDI window
// g_mdiform.WorkingPanel returns the right SplitterPanel
this.MdiParent = g_mdiform;
g_mdiform.WorkingPanel.Controls.Add(this);
I tried the following code within the Mdi Window class as a test.
Form frm = new Form();
frm.SetBounds(100, 20, 100, 100);
frm.MdiParent = this;
splMDIPane.Panel2.Controls.Add(frm);
frm.Show();
The above problem still exists.... If anyone knows how I can resolve this, please let me know...
Thanks
Mahesh
|
|
|
|
|
Hi, Mahesh.
If you want to create a classic MDI application then you shouldn't use SplitterPanel in your main form. You just need to follow next steps:
1. Set MainForm.IsMdiContainer = true.
2. Add a TreeView to the MainForm and set treeView.Dock = Left.
3. Add a Splitter to the MainForm and set splitter.Dock = Left.
4. When you need to create MDI child use this:
ChildForm child = new ChildForm();
child.MdiParent = this;
child.Show();
|
|
|
|
|
Hi Andrew,
Thanks
I was trying to create a Tree navigator that could be hidden or moved out of the way if required... I'm still new to C# and doing a project for my degree. I was trying to get a Navigator which is Dockable and Floatable. I was trying to use a SplitContainer so that the Navigator could be hidden when not required. I found a third party library (from a code project article) called Magic Library, which provides a great docking manager... It seems to provide the functionality that I require. I'm trying to use that for the Tree Navigator.
thanks again for ur help
Mahesh
|
|
|
|
|
hi i want to know the different ways of interfacing with MS Office.
Any and all kind of interfacing - whether it is through CSV files, object intereaction, anything else
please do suggest me or give me some inputs....
|
|
|
|
|
|
Check out the Visual Studio Tools for Office (VSTO). I've automated an excel spreadsheet to retrieve information from a database and perform automatic calculations/autoformat/etc. Eric Carter and Eric Lippert wrote a great book on it in the Microsoft .NET development series.
|
|
|
|
|
You can also use ODBC connections against Excel files or third party software like Aspose as well.
|
|
|
|
|
As I study more C# and work with it more at my job, I have read and heard the term "Sink" what exactly does that mean? I have heard it in reference with events and delegates but do not have a clear understanding of its meaning. Any help would be great appreciated.
|
|
|
|
|
I suppose. So if you have an event the listener would be the sink.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Hi
I would like to know what happens when you hit the Help Button (the question mark) and then click a control on the form. How does it show the HelpString? I would like to do that when i hit, for example, Ctrl+F1.
Thanks
|
|
|
|
|
|
Hi there,
I've got an Image object which I'd like to turn into a greyscaled image without big fuzz. I've been searching the board and the articles, but found only a couple of pretty complicated snippets. All of them required the Image to be turned into a Bitmap and manipulated the individual pixels.
Has anyone got a snippet which can work directly with the Image ? Or, if not, can anyone tell me please how to convert an Image into a Bitmap and vice versa?
Quality of the image is not an issue. Purpose of the code is just to display a lightweight preview of the image without eating up tons of resources.
Thanks a lot in advance.
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
private void Form1_Load(object sender, System.EventArgs e)<br />
{<br />
OpenFileDialog dlg = new OpenFileDialog();<br />
dlg.Filter="Image files (*.BMP, *.JPG, *.GIF)|*.bmp;*.jpg;*.gif";<br />
if(dlg.ShowDialog()==DialogResult.OK)<br />
{<br />
Image img = Image.FromFile(dlg.FileName);<br />
Bitmap bm = new Bitmap(img.Width,img.Height);<br />
Graphics g = Graphics.FromImage(bm);<br />
<br />
<br />
ColorMatrix cm = new ColorMatrix(new float[][]{ new float[]{0.5f,0.5f,0.5f,0,0},<br />
new float[]{0.5f,0.5f,0.5f,0,0},<br />
new float[]{0.5f,0.5f,0.5f,0,0},<br />
new float[]{0,0,0,1,0,0},<br />
new float[]{0,0,0,0,1,0},<br />
new float[]{0,0,0,0,0,1}});<br />
<br />
<br />
<br />
ImageAttributes ia = new ImageAttributes();<br />
ia.SetColorMatrix(cm);<br />
g.DrawImage(img,new Rectangle(0,0,img.Width,img.Height),0,0,img.Width,img.Height,GraphicsUnit.Pixel,ia);<br />
g.Dispose();<br />
this.BackgroundImage=bm;<br />
}
I got this from here: http://www.bobpowell.net/grayscale.htm[^]
Any good?
|
|
|
|