Jump to content
Xtreme .Net Talk

TreasonX

Members
  • Posts

    6
  • Joined

  • Last visited

About TreasonX

  • Birthday 04/11/1978

Personal Information

  • .NET Preferred Language
    C++

TreasonX's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Okay here is the best thing I can come up with on start up minimize and hide from task bar. set formBorderStyle to FixedToolWindow this hides it from alt tab. It works.. but it doesnt seem like the best way. If you find something better give me a holla :) credit for this information goes to: http://www.xtremedotnettalk.com/showthread.php?s=&threadid=69213&highlight=alttab
  2. Well anyway the answer to hiding the form on startup is. Set the windows state to minimize on startup Hide it from the task bar then when you show the form restore the windows state to normal then show Thats the easiest way I have found to do it.
  3. Thats what I was actually looking for. But looks like the timer is my best bet.. Seems like a waste and there has to be a better way. Ill keep looking :)
  4. Is there anyway to have the clipboard notify a program if the contents have been changed? Right now, i am considering a timer to check the contents of the clipboard and then compare to the last thing taken from the clipboard. Is this the best way to tell if the contents have been changed? I have looked in MSDN but have come up with nothing. Thanks James
  5. Okay Im really new to XML so please forgive me :) I have written a small class that will populate a Tree View with the elements from a simple XML file. I would like the list box to display the XML like so. -Root |_ Folder_One | |_Thing_One | |_Thing_Two |_Folder_Two |_Thing_Three |_Thing_Four I can get it to display like this with the following XML File: <Root> <Folder_One> <Thing_One></Thing_One> <Thing_Two></Thing_Two> </Folder_One> <Folder_Two> <Thing_Three></Thing_Three> <Thing_Four></Thing_Four> </Folder_Two> </root> Is this the proper XML format for what I am trying to achieve? Here is a sample of the method used to display the XML in a Tree View: private void BuildTree( XmlNode xmlSourceNode, XmlNode document, TreeNode treeNode ) { // create XmlNodeReader to access XML document XmlNodeReader nodeReader = new XmlNodeReader( xmlSourceNode ); // represents current node in DOM tree XmlNode currentNode = null; // treeNode to add to existing tree TreeNode newNode = new TreeNode(); // references modified node type for CreateNode XmlNodeType modifiedNodeType; while ( nodeReader.Read() ) { // get current node type modifiedNodeType = nodeReader.NodeType; // check for EndElement, store as Element if ( modifiedNodeType == XmlNodeType.EndElement ) modifiedNodeType = XmlNodeType.Element; // create node copy currentNode = copy.CreateNode( modifiedNodeType, nodeReader.Name, nodeReader.NamespaceURI ); // build tree based on node type switch ( nodeReader.NodeType ) { // if Text node, add its value to tree case XmlNodeType.Text: newNode.Text = nodeReader.Value; treeNode.Nodes.Add( newNode ); // append Text node value to currentNode data ( ( XmlText ) currentNode ).AppendData( nodeReader.Value ); document.AppendChild( currentNode ); break; // if EndElement, move up tree case XmlNodeType.EndElement: document = document.ParentNode; treeNode = treeNode.Parent; break; // if new element, add name and traverse tree case XmlNodeType.Element: // determine if element contains content if ( !nodeReader.IsEmptyElement ) { // assign node text, add newNode as child newNode.Text = nodeReader.Name; treeNode.Nodes.Add( newNode ); // set treeNode to last child treeNode = newNode; document.AppendChild( currentNode ); document = document.LastChild; } else // do not traverse empty elements { // assign NodeType string to newNode newNode.Text = "Empty"; treeNode.Nodes.Add( newNode ); document.AppendChild( currentNode ); } break; // all other types, display node type default: newNode.Text = nodeReader.NodeType.ToString(); treeNode.Nodes.Add( newNode ); document.AppendChild( currentNode ); break; } // end switch newNode = new TreeNode(); } // end while // update the TreeView control treeListing.ExpandAll(); treeListing.Refresh(); }// end BuildTree Thanks for the help! Also if I could get some links to good XML sites please post them.
  6. I have just finished 2 courses on C++, and I am trying to decide if I should jump right in and learn the Microsoft Foundation Classes or should I focus on C# for windows development? I did very well with C++ which covered procedural programming and control structures in the first course, and in the second it moved on to OOP (classes, inheritance, polymorphism, virtual functions, etc). I will be learning windows development on my own so I am torn on which language to go with. I like the power of C++ and I have a deeper understanding of it, but C# does most of the dirty work for you and makes programming in windows a bit easier without giving up too much power. If you a seasoned windows programmer please post your thoughts on my choice. Thanks James
×
×
  • Create New...