113 Posted Topics
Re: You will need to start with node of the C: drive and then call a recursive function that would receive in parameter a TreeNode (that will keep building after each recursive calls) and a DirectoryInfo. If the item in the directory is not a folder simply add it (supposing that … | |
Re: What you need is double buffering. What happens is that each time you minimizer or drag something over your panel its automaticly repaint from the original state. What you have to do is, before designing it in your canvas, you need to save it a separate object that is not … | |
Re: you could validate on ValueChanged of DateTimePicker. Simply go to your designer and add an event ValueChanged in the datetimepicker. | |
Re: You can simply go into the event properties of the designer (little lightning) and map it to same method in the dropdownlist. or add something similar to designer code view: [code] this.lbReports.SelectedIndexChanged += new System.EventHandler( this.lbReports_DoubleClick ); this.lbReports.BindingContextChanged += new System.EventHandler( this.lbReports_DoubleClick ); [/code] | |
Re: All depends on what you want to search in the xml file, could your provide a short sample of what your xml looks like? | |
| |
Re: if you want to see designer.cs and all the backend stuff click "Show All Files" toggle button at the top of solution explorer. | |
Re: Try this, it worked for me. [url]http://www.dotnetspider.com/forum/173555-doc-txt-c-asp-net.aspx[/url] | |
'm working a on a link checker/broken link finder and I am getting many false positives, after double checking I noticed that many error codes were returning webexceptions but they were actually downloadable, but in some other cases the statuscode is 404 and i can access the page from the … | |
Re: [code] Form frm = new Form(); frm.Show(); or frm.ShowDialog(); [/code] | |
Re: If you want something more simple do the following: [code] if(ctrl.InvokeRequired) { ctrl.Invoke( (MethodInvoker)delegate { ctrl.Text = "hola!"; }); } [/code] The only difference between this and nick's method, is that he will have a specific delegate (recallable), and I'm just making one on the fly. | |
Re: could you provide more information/example? This is really unclear. | |
Re: Cast (ComboBox) in front of the a item. [code] (ComboBox)a.Items.Add(); [/code] | |
Re: HtmlAgilityPack is more than awesome for Html parsing, it's basicly like playing with an xml with linq or xpath. | |
Re: Can you show sample of how you save the textbox? | |
Re: In your setData you could simply change public properties and then access it from the other class. [code] public class Data { private int _age = 0; public int Age { get { return _age; } set { _age = value; } } public void setData(int age, string name, string … | |
Re: There is two way of doing, with an array of DataTable or, which I reocmmed a DataSet [code] DataSet d = new DataSet(); d.Tables.Add(new DataTable()); [/code] So basicly after you've filled your datatable, you add it to the dataset. you can also access a datatable with an indexer (string or … | |
Re: changing the property IsBackground = true; should help ya. however, if this is not working, add an event handler and when the work is complete, you can simple do Thread.CurrentThread.Abort() when an event is raised. | |
Re: It's probably possible with reflection, however, why dont you store your matrix in a Collection called matrixcollection than use and indexer to grab which "number" you want. Something like the following would be quite interresting for your case: [code] Dictionary<string, CustomObj> map = new Dictionary<string, CustomObj>(); foreach (string name in … | |
Re: Navigate is used with Uris, use this instead: [code] string html = "<html><body><strong>HelloWorld!</strong></body></html>"; Browser.DocumentText = html; [/code] | |
Re: Personnaly, what I'd do, is create a static class containing only string properties for all the text written in the application. And then for each properties you would return the value depending on the language set in the user settings or last used settings (Settings.settings) This way each text area … | |
Re: Thats how you would do it with LINQ. [code] XDocument xdoc = XDocument.LoadXml(sXML); XDocument xdoc = xdoc.Descendants("wtf").Where(p => p.Value == "on").FirstOrDefault().Parent.Remove(); [/code] | |
Re: Why dont use simply use two events handlers with a flag ; a simple boolean that would be called button1Clicked, buttonLabelClicked? | |
Re: [CODE] HttpWebRequest request = (HttpWebRequest)WebRequest.Create( uri ); (HttpWebResponse)request.BeginGetResponse(AsyncCallBackDelegate, state); [/CODE] After what you catch in the delegate method each time a block is downloaded and when you find the desired item stop the async call. You can also change some properties to set the chunk of information you want to … | |
Re: You could check the image state on each click and do the appropriate action depending on that. A kind of if shown, hide or if hidden, show. | |
Re: almost had it. [CODE]combobox1.Items.Add(textbox1.text);[/CODE] | |
Is there an option in Outlook 2003 or a free add-on I can add to enable the popup(toasts) when an email enter in a subfolder of inbox (because a rule I created) Thanks for your help! | |
I've added a small function in the Resources.Designer.cs and it working great, the problem is that when I add or remove something from the Resources.resx this function always get removed, is there any indicator I could put or anyway to bypass this? Thank you! | |
I know that technically, an Interface is used for reading and not writting or editing however, I want to add an add and addrange function to the following class, here is what I currently have which is not working [code] public class HrefCollection : IEnumerable<Href> { private IEnumerable<Href> hrefs; public … | |
I'm currently developping an app that is going through all the files on a server and checking every single hrefs to check wether they are valid or not. Using a WebClient or a HttpWebRequest/HttpWebResponse is kinda overkilling the process because it downloads the whole page each time, which is useless, … | |
Context: I have a search functionnality in my webapp that is looking in a few different xml for the ids im searching for. (I can search for a range, or different values). After search is completed it returns me a bunch of objects that I can click on and it … | |
Re: There is a nice properties that you can use that will make everything way more easy. [CODE] this.textBox1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; this.textBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.FileSystemDirectories;[/CODE] Not as fancy, but it does the job :) You can also look for these properties in the designer to see the options :) | |
I'm starting a process in a thread that is used to built up a treeview with a recursive method. I'm getting the following error "Action being performed on this control is being called from the wrong thread. marshal to the correct thread using Control.Invoke or Control.BeginInvoke to perform this action." … | |
Re: When you click a button, It should cast an event and when the event it handled (going into your method) you can convert the "object sender" defined in the method's parameter to a "Button". Then this way, you can get the Text property of the button and parse it to … | |
Re: [QUOTE=elmod;1204710] Hello, I am currently developping an application in c# (console app). It is detecting the open windows (the ones population the taskbar) and it gives their name. Well, what I want to do is detect the path of these windows a good example would be word documents opened. i.e.: … | |
Re: [QUOTE=Antenka;1205222]Hello, your way is technically correct. I just want to know .. are you new to c# or to programming at all? Just there is a better way to store data, e.g. using List<T> and structures or classes .. P.S. Please, next time put your code in code tags :)[/QUOTE] … | |
Re: [url]http://www.w3schools.com/xpath/xpath_syntax.asp[/url] Take a look at this. You can put a condition in your xpath [CODE] foreach (XmlNode na in xml.SelectNodes("/slovicka/lekce[@id=12]/verb"))[/CODE] | |
Re: [QUOTE=farsen;1192876]Hi. Quite a simple question I guess. I have this xml file: [CODE] <?xml version="1.0" encoding="utf-8" standalone="yes"?> <tasks> <subject> <id>123</id> <headline>a big headline</headline> <content>important stuff</content> </subject> <subject> <id>222</id> <headline>even bigger headline</headline> <content>important stuff 2</content> </subject> <subject> <id>333</id> <headline>a small one</headline> <content>important stuff333</content> </subject> </tasks> [/CODE] With C# I have loaded … | |
Re: [quote] Writting into .config file is not a good idea. The config files are intended to give administrators a way to configure certain settings and not to persist settings. They reside (normally) under program files folder thus only admin (if not set otherwise) can edit them. If you have settings … | |
Re: [QUOTE=scorpio222;1190823]hi. i am creating a new csv file pro grammatically in C# where i am going to take values from a csv file that is already present with me. consisder this csv file, firstname,lastname,middle,company,email xxxxxx,xxxxxxx,xxxxx,xxxxxxx,xxxxx yyyyyy,yyyyyy,yyyyyy,yyyyyy,yyyyyy zzzzzz,zzzzzz,zzzzzz,zzzzzz,zzzzzz I need to read certain values from each row of this file and … | |
Re: [QUOTE=Girish_AM;1190194]Dear All, I am doing c# project, I want to trap (detect) Tab key pressed on control. If anybody knows then please reply me. Thanking You[/QUOTE] Simply add a KeyPressEventArgs to your controls and in your method do the following: e being event: [code] if(e.KeyCode == 9) { // do … | |
Re: [QUOTE=zachattack05;1180178]Not sure what code to post, I am working on creating a record editor, similar to an MS access form that navigates through a filtered set of records. I don't have any code really on the record editor yet, it's a blank form. I wanted to figure out how I … | |
Re: The "==" is a comparing operator which returns true or false. Unlike the "=" operator that will assign a value to element. Simply use == for comparison and = for assigning value. | |
Thank you for reading, I am currently trying to pass through a project or whole sites containing many pages to determine wether they are xhtml-strict or not with a local xhtml-strict.dtd file. I cannot go through a webservice it would be too overkilling for server and host might even probably … | |
Re: [QUOTE=techstu;1183845]thanks....this helped, par i have another problem, i need to search for a string in a line and replace it, do u have a code for this in c#.[/QUOTE] You need to put all your content in a string and then replace what you need a and rewrite the text … | |
Re: [QUOTE=john_beginner;1181998]hello all of u ! i m begging in c# and making one program in asp.net ! i have very simple query , [code=c#] public partial class _Default : System.Web.UI.Page { public String str; protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { str … | |
I am running xhtml-strict report on a bunch of pages and each time I find a page on a specific page I save it. I need to really look over all the page but what happens is that sometimes the XmlReader is failling but I cannot go on and check … | |
Is there a way I can know what is the Url I am currently browsing? If I would use that command or script it on this page it would return me: [url]http://www.daniweb.com/forums[/url] And if I would be testing on localhost or on some acceptance server, it would return me [url]http://localhost:1996/forums[/url] … | |
Re: Any restrictions? |
The End.