Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

kyledunn

@kyledunn
About
Posts
46
Topics
22
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Passing XmlResolver to Transform() method
    K kyledunn

    Thank you Nick! I did need to use an XPathNavigator but even then the error message about using XmlResolver still appeared. Upon further research I found that XmlResolver is a argument in the Transform method. Transform(XPathNavigator, XsltArgumentList, TextWriter, XmlResolver); I had left this argument out and that is what generated the error. I still have no clue as to when or why to use a XmlResolver but found when I inserted a null for the arguemnt as it appears in your code that the error disappeared. Transform(nav,null,writer,null); I suspect you can create custom resolvers to influence the Transform but that's for another day. Problem solved. Thank you. Kyle

    XML / XSL xml html sysadmin help question

  • Passing XmlResolver to Transform() method
    K kyledunn

    Thank you Nick! I did need to use an XPathNavigator but even then the error message about using XmlResolver still appeared. Upon further research I found that XmlResolver is a argument in the Transform method. Transform(XPathNavigator, XsltArgumentList, TextWriter, XmlResolver); I still have no clue as to when or why to use a XmlResolver but found when I inserted a null for the arguemnt that the error disappeared. Transform(nav,null,writer,null); I suspect you can create custom resolvers to influence the Transform but that's for another day. Problem solved. Thank you. Kyle

    C# xml html sysadmin help question

  • Passing XmlResolver to Transform() method
    K kyledunn

    Hi, I have a method to render HTML from XSLT. Here is the method: /// /// Method that renders HTML from XSLT document /// /// protected override void Render(HtmlTextWriter writer) { XPathDocument xdoc = new XPathDocument(Context.Server.MapPath(sourceFilePath)); XslTransform xslt = new XslTransform(); xslt.Load(Context.Server.MapPath(transformFilePath)); xslt.Transform(xdoc, null, writer); } I am now getting this warning: warning CS0618: 'System.Xml.Xsl.XslTransform.Transform(System.Xml.XPath.IXPathNavigable, System.Xml.Xsl.XsltArgumentList, System.IO.TextWriter)' is obsolete: 'You should pass XmlResolver to Transform() method' I need some help resolving this warning. Can you help? Kyle

    XML / XSL xml html sysadmin help question

  • Passing XmlResolver to Transform() method
    K kyledunn

    Hi, I have a method to render HTML from XSLT. Here is the method: /// /// Method that renders HTML from XSLT document /// /// protected override void Render(HtmlTextWriter writer) { XPathDocument xdoc = new XPathDocument(Context.Server.MapPath(sourceFilePath)); XslTransform xslt = new XslTransform(); xslt.Load(Context.Server.MapPath(transformFilePath)); xslt.Transform(xdoc, null, writer); } I am now getting this warning: warning CS0618: 'System.Xml.Xsl.XslTransform.Transform(System.Xml.XPath.IXPathNavigable, System.Xml.Xsl.XsltArgumentList, System.IO.TextWriter)' is obsolete: 'You should pass XmlResolver to Transform() method' I need some help resolving this warning. Can you help? Kyle

    C# xml html sysadmin help question

  • Implementing ISite to have access to DesignMode indicator
    K kyledunn

    I am creating a custom control that inherits the ComboBox class. I would like to use the ISite.DesignMode indicator to determine if the control is being viewed in design mode but the property always comes up false. MSDN documentation says the design mode indicator is stored in the ISite; therefore, if the Component does not have an ISite associated with it, this property is always false. Other things I have read said to assign the atribute to the class to designate which class to apply the ISite implementation but I have not seen any examples that put all the pieces together. Can anyone share with me this method or any other method that would allow me to determine when this custom control based on a combobox is in design mode? Thanks, Kyle

    C# design question

  • Inheriting textbox and setting property values
    K kyledunn

    Hi Andy, I set the value of this.Width to equal 300 in the constructor for the custom textbox control and then changed it to 100 in the property browser. Upon running the form the textbox reverted to a width of 300 which led me to the false statement above. I just tried setting the value to any other number than it's original default and it worked as you described. The original default number was influencing the behavior I was describing. Thanks for the explanation about the DefaultValue. That makes sense. I agree it's a bad idea to change the default name. I was interested in changing the default, not necessarily getting rid of the sequential number, but it was a bad example to choose. Thanks for your help. Kyle

    C# tutorial question

  • Inheriting textbox and setting property values
    K kyledunn

    Andy, Thank you very much for your help. Yes I do want to play nice with the property browser. Setting the value of properties in the constructor means they are now fixed at that value regardless of changes made in the property browser. I am looking to maintain normal design time behaviour. I just want to override the default name that appears when a control is dropped on a form. I tried to override the property declaration with this code: private string name = ""; [DefaultValue("tbx")] public string Name { get { return name; } set { name = value; } } but got this warning: c:\documents and settings\kyle\my documents\visual studio projects\numericonlytextbox\numericonlytextbox.cs(49,17): warning CS0108: The keyword new is required on 'CustomControl.NumericOnlyTextBox.Name' because it hides inherited member 'System.Windows.Forms.Control.Name' and it did not set the Name value to the default "tbx". I am also very intrigued by the ShouldSerialize method. Do you have any short segments of code you would share that could help me to better understand overriding the inherited property and SouldSerialize method? Thanks again, Kyle

    C# tutorial question

  • Inheriting textbox and setting property values
    K kyledunn

    After creating a new class that inherits the System.Windows.Forms.TextBox, in the new class I would like to set value of the default Name (other defaults as well) for the TextBox when a new instance is created by dragging the control from the Toolbox and dropping it on a Form. Any idea how to do this? Kyle

    C# tutorial question

  • Parsing RichText File
    K kyledunn

    Yes, I use the LoadFile method to load the file except I use the rtf extension for the filename, richTextBox1.LoadFile(@"C:\MyDocs\Testdoc.rtf"); and it does render properly in the richTextBox1. I can change the formatting, cut and paste images, save and reload the file and it always renders properly to the screen complete with images and formatting. I would like to print what I see on the screen. Actually I want to add the richTextBox contents to the end of a report I am already successfully printing. I can send the richtext formatting code to a stream and thought I might have to parse it to convert it the the proper information to feed the drawstring methods for printing. But I will appreciate any other options as well that will allow me to print the rtf document. Thanks for your help. Kyle

    C# csharp json help question

  • Parsing RichText File
    K kyledunn

    Hi Leppie, I have the rtf file loaded into a richtextbox and I can print it as a standard text document without formatting or graphics but cannot yet print it with formatting and graphics. Can you tell me how to do this complete with formatting and graphics? Kyle

    C# csharp json help question

  • Parsing RichText File
    K kyledunn

    I'm looking for information about parsing a RichText file for printing with C#. Can anyone help with some information or a lead to finding more about this process? Thanks, Kyle

    C# csharp json help question

  • Center text in a RichTextBox
    K kyledunn

    Thanks, that does the job. Have a nice nap ... Kyle

    C# help tutorial

  • Center text in a RichTextBox
    K kyledunn

    Can anyone tell me how to center selected text in a RichTextBox. I loaded a rtf formatted document from Word that was centered in Word and it displayed centered in the RichTextBox so I think it can be done. I would apprectiate any help. Thanks, Kyle

    C# help tutorial

  • SQL Query Analyzer in VS.NET?
    K kyledunn

    That sounds great Dave! How did you do that? Kyle

    Visual Studio database csharp visual-studio tools question

  • SQL Query Analyzer in VS.NET?
    K kyledunn

    Is there an equivalent query tool to SQL Query Analyzer in VS.NET where I can load a script and execute it? I looked but didn't find one. Is there an alternative solution for loading and executing sql scripts in VS.NET?

    Visual Studio database csharp visual-studio tools question

  • Deleting a file
    K kyledunn

    Me too! Being new to C++ I searched for "delete file" on this site and when I didn't find a clear answer I asked the silly question. I should have tried the on-line help first. Please accept my apology. Kyle

    C / C++ / MFC help

  • Deleting a file
    K kyledunn

    Can someone share a sample of code that deletes a file when the path is known. Thanks for any help. Kyle

    C / C++ / MFC help

  • Getting the data from a CString into an LPVOID data type
    K kyledunn

    I emailed Tom directly. He responded shortly before I posted his help here. Kyle

    C / C++ / MFC help question

  • Getting the data from a CString into an LPVOID data type
    K kyledunn

    Tom Archer shared this answer with me so I wanted to share it with others. Thanks Tom! It's easy. Just call the CString::GetBuffer function. Here's an example where I have a function that takes an LPVOID and another function that calls it twice (once passing a hard coded literal and then with a CString). Note that I'm using VC7. You might need to call GetBuffer(0) in VC6. void CallTest() { Test("abc"); CString str = "def"; Test(str.GetBuffer()); // This is what you need to do in your case. } void Test(LPVOID lp) { AfxMessageBox((const char*)lp); } That should set you up. Cheers, Tom It did! Thanks again Tom.

    C / C++ / MFC help question

  • Getting the data from a CString into an LPVOID data type
    K kyledunn

    If I pass a quoted string variable to the LPVOID argument of a method it accepts it but if I pass a CString to the LPVOID augument I get a compiler error, cannot convert from 'CString' to 'LPVOID'. Can anyone help me with getting the data from a CString into an LPVOID data type? Kyle

    C / C++ / MFC help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups