113 Posted Topics

Member Avatar for galrave

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 …

Member Avatar for galrave
0
90
Member Avatar for Feanorith

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 …

Member Avatar for Feanorith
0
148
Member Avatar for judithSampathwa

you could validate on ValueChanged of DateTimePicker. Simply go to your designer and add an event ValueChanged in the datetimepicker.

Member Avatar for pabloh007
0
733
Member Avatar for judithSampathwa

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]

Member Avatar for judithSampathwa
0
279
Member Avatar for ajwei810192

All depends on what you want to search in the xml file, could your provide a short sample of what your xml looks like?

Member Avatar for ajwei810192
0
545
Member Avatar for kdcorp87
Member Avatar for madhan

if you want to see designer.cs and all the backend stuff click "Show All Files" toggle button at the top of solution explorer.

Member Avatar for PierlucSS
0
105
Member Avatar for MillStrike
Member Avatar for KathySbeat

Try this, it worked for me. [url]http://www.dotnetspider.com/forum/173555-doc-txt-c-asp-net.aspx[/url]

Member Avatar for sashaa
0
95
Member Avatar for PierlucSS

'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 …

0
57
Member Avatar for nozzers
Member Avatar for PierlucSS
0
94
Member Avatar for adobe71

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.

Member Avatar for PierlucSS
0
105
Member Avatar for sdhawan
Member Avatar for sdhawan
0
141
Member Avatar for wlalth

Cast (ComboBox) in front of the a item. [code] (ComboBox)a.Items.Add(); [/code]

Member Avatar for nick.crane
0
3K
Member Avatar for visweswaran28

HtmlAgilityPack is more than awesome for Html parsing, it's basicly like playing with an xml with linq or xpath.

Member Avatar for PierlucSS
0
89
Member Avatar for aliensXY
Member Avatar for tchiloh

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 …

Member Avatar for tchiloh
0
113
Member Avatar for loveforfire33

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 …

Member Avatar for PierlucSS
0
83
Member Avatar for maxish

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.

Member Avatar for PierlucSS
0
173
Member Avatar for RHodgett

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 …

Member Avatar for PierlucSS
0
97
Member Avatar for yda

Navigate is used with Uris, use this instead: [code] string html = "<html><body><strong>HelloWorld!</strong></body></html>"; Browser.DocumentText = html; [/code]

Member Avatar for PierlucSS
-1
382
Member Avatar for guiman

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 …

Member Avatar for PierlucSS
0
231
Member Avatar for abcdabid

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]

Member Avatar for papanyquiL
0
91
Member Avatar for sdhawan

Why dont use simply use two events handlers with a flag ; a simple boolean that would be called button1Clicked, buttonLabelClicked?

Member Avatar for sdhawan
0
219
Member Avatar for CsKe

[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 …

Member Avatar for CsKe
0
127
Member Avatar for reza.adinata

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.

Member Avatar for ddanbe
0
106
Member Avatar for sdhawan
Member Avatar for PierlucSS

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!

Member Avatar for PierlucSS
0
202
Member Avatar for PierlucSS

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!

Member Avatar for nick.crane
0
154
Member Avatar for PierlucSS

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 …

Member Avatar for PierlucSS
1
239
Member Avatar for PierlucSS

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, …

Member Avatar for Ketsuekiame
0
170
Member Avatar for PierlucSS

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 …

Member Avatar for sknake
0
78
Member Avatar for krishnisilva

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 :)

Member Avatar for Szpilona
0
250
Member Avatar for PierlucSS

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." …

Member Avatar for PierlucSS
0
1K
Member Avatar for Jimingle10

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 …

Member Avatar for newenglandguy
0
854
Member Avatar for elmod

[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.: …

Member Avatar for PierlucSS
-1
107
Member Avatar for Turismosan

[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] …

Member Avatar for PierlucSS
0
149
Member Avatar for Mutagen

[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]

Member Avatar for Mutagen
1
286
Member Avatar for farsen

[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 …

Member Avatar for PierlucSS
0
3K
Member Avatar for nitin2010

[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 …

Member Avatar for PierlucSS
0
104
Member Avatar for scorpio222

[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 …

Member Avatar for scorpio222
0
201
Member Avatar for Girish_AM

[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 …

Member Avatar for PierlucSS
0
113
Member Avatar for zachattack05

[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 …

Member Avatar for zachattack05
0
623
Member Avatar for songweaver

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.

Member Avatar for ddanbe
0
180
Member Avatar for PierlucSS

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 …

Member Avatar for PierlucSS
0
238
Member Avatar for techstu

[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 …

Member Avatar for Szpilona
0
92
Member Avatar for john_beginner

[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 …

Member Avatar for john_beginner
0
153
Member Avatar for PierlucSS

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 …

Member Avatar for PierlucSS
0
248
Member Avatar for PierlucSS

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] …

Member Avatar for PierlucSS
0
96
Member Avatar for abubeker

The End.