null works thank! I actually thought I had tried that. Rapier
Rapier503
Posts
-
pictureBox.image default (no picture) -
pictureBox.image default (no picture)Hi, I setting pictureBox.image = Image.FromFile("eweew.bmp"); This works file, but at times I want no picture to be displayed. How do I set pictureBox.image to no value or default? Thanks in advance. Rapier
-
Problem with code after ShowDialog and XML add nodeHello, The code below I have:- static string filename; static XmlDocument xmlDoc; and open the XML file in the Form Load. If I remove the :- if (testDialog.ShowDialog() == DialogResult.OK) Line the XML addnode code works OK. With the ShowDialog() line in the XML node add code does not work. Why? Also is there something I can check (return code?) to make sure each part of the add node lines of code has worked? void Button1Click(object sender, EventArgs e) { NewForm testDialog = new NewForm(); if (testDialog.ShowDialog() == DialogResult.OK) { MessageBox.Show("Here"); XmlNode root = xmlDoc.DocumentElement; XmlElement childNode = xmlDoc.CreateElement("ABCD"); XmlElement childNode2 =xmlDoc.CreateElement("Name"); XmlText textNode = xmlDoc.CreateTextNode("ABCD"); root.AppendChild(childNode); childNode.AppendChild(childNode2); childNode2.SetAttribute("Name", "Name"); childNode2.AppendChild(textNode); xmlDoc.Save(filename); MessageBox.Show("Here2"); } testDialog.Dispose(); } Thanks is Advance, Rapier
-
Start/stop buttonThanks BackgroundWorker looks right for the job !!!
-
Start/stop buttonThanks, but I don't think this is what I want. I want the code that is started (with the start button) to run continuously (loop within the code) until the stop button is pressed. Thanks
-
Start/stop buttonI am wanting to use a button on a form as a start/stop button for a piece of code. I could put the piece of code in the click function for the button, but is there a better way of achieving this? Via a object of another function? If so how would I trigger the start stop? Please give a code example. Thanks in advance.
-
Lock ListView ColumsHi, How do you stop listview columns been able to be resized? I want to lock the column sizes. Thanks in Advance. Rapier503
-
Newbie Inheritance questionWhen you inherited from a base case do you ALWAYS inherit all the functions and variables of the base class? I.e. If a base class has hundreds of variables and hundreds of functions do you inherit them all even if you don’t need them? Thanks in advance. Rapier503