Jump to content
Xtreme .Net Talk

Cags

Avatar/Signature
  • Posts

    699
  • Joined

  • Last visited

Everything posted by Cags

  1. I don't know whether it applies to general programming, but when I was working with access databases back at 6th form (5 years ago now) we were told that if a number will never be used for calculation you should store it as a string.
  2. When you say "After I publish my C# VS2005 application (to be installed from CD-ROM)" do you mean you've created a deployment package and installed it on a PC other than the development PC?
  3. Well I'm not sure who advised that but I see no need for activex, the way the page you used as an example works is it takes the time, sends a specific amount of data, then takes the time again. Then it just finds out the difference between the two times and thats how long it took.
  4. CurrentRowIndex is a property of a DataGrid, however you are using a DataGridView which presumably has different properties. I can't help however as I don't appear to have this control, assumably its a VS 2005 control.
  5. I got the impression from the original post that the code is supposed to search through each subfolder, not simply list the top level subfolders (I can't be sure as I've never used the My namespace). If this is the case you will need to call the method recursively. If this is the case there have been alot of posts about this recently so just search the forum.
  6. Whilst you could program this, you could program something to achieve the effect and set it up using the windows task scheduler (thus not needing the timer code). Just a suggestion.
  7. Well I don't know anything about asp, but heres what it looks like in vb if that helps. ' in main code body GetXMLFiles("c:\FolderNameHere") Private Sub GetFiles(ByVal path As String) ' search subdirectories For Each dir As String In System.IO.Directory.GetDirectories(path) GetFiles(dir) Next ' do something else here with files or directories ' as an example... For Each file As String In System.IO.Directory.GetFiles(path, "*.xml") ListBox1.Items.Add(file) Next End Sub
  8. Perhaps if you could call this method on a seperate thread you could terminate the thread after 30 seconds if its still open. Just an idea, it might not work, but there again it might inspire an idea from somebody else.
  9. Cags

     

    Dreamweaver does the same. As for not working in Firefox I don't know. All I can say is that for several of my university assignments I deleted the space and it functioned fine in Firefox. I found that you have to delete it in order to lower the height past a certain point.
  10. You need to make a recursive loop to search all folders. So for each directory in a directory you call SearchFiles passing in the directory path.
  11. I could be wrong but I got the impression that interwanderer wanted to execute the query section of the code and essentially pause the state of the application allowing that to be used as a start point. Thus allowing them to work on the code performed afterwards and upon changing the code, restarting from just after the query. If this is the case then surely a seperate thread / background execution probably wouldn't help (as i'm assuming the code works with the results of the query). As you say though a query taking that long does seem perculiar. If my assumptions of what they are trying to achieve is correct then I would have thought storing the results of the query to file would be the best option. Then the query code can be commented out, a quick section of code loading the results can be added and the rest of the code can be worked on. Alternatively hardcoding results to the query whould allow work on the code to continue without running the query everytime.
  12. As far as I know this isn't possible I'm afriad. But I might be wrong.
  13. Does the 'clean machine' have the .Net Framework Installed?
  14. As you say the problem with the code you tried is that you are accessing a seperate instance of the form not the original one. The answer you seek is contained within the other posts you have seen. Take two forms MainForm and OptionsForm. If you set the contructor of the OptionsForm to accept a MainForm as a parameter, and then store a reference locally then you can access any public method or object from that MainForm. There are examples on the forum, but if you need more help please feel free to ask.
  15. Well I'm not going to pretend to know anything much about web development, so if I speak nonesense then just ignore me. When you say WebReference are you talking about a System.Web.Services.Description.WebReference object or something else?
  16. It 'might' be a valid candidate for some sort of xml parsing using either the XmlTextReader or the XML DOM. I suspect this would give you slightly more control than Regular Expressions (assuming you know exactly which nodes you need the numbers from).
  17. You could store the address in either a textfile or the registry, then simply look up the address when you boot up the program.
  18. I've had a quick look and you appear to be correct, if you add the classes directly to the combobox the SelectedValue returns nothing. If however you add the items to an ArrayList and set this as the DataSource of the combobox, then calling SelectedValue.ToString() will return the ValueMember of the selected class. Having said this theres nothing wrong with the method you are currently using as far as I'm concerned (though a professional may differ in opinion). On a side note SelectedText returns nothing as this refers to the editable text in a combobox, which cannot be selected during a SelectedIndexChanged Event (I think).
  19. Do you wish to check if an item is unique when you are adding it, or check through a list and remove and duplicate values?
  20. I'm not entirely sure I understood your question, but from what I understand your trying to say that the SelectedText and the SelectedValue properties are always return an empty string/object? Do the values display in the combobox correctly (i.e displaying the DisplayMember)?
  21. I used the default one. It came either with Visual Studio 2003 or with the .Net Compact Framework SDK. I never did any networking stuff with it, but I know a friend that got TCP/IP working. I had the linking problem a few times, but I can't say off the top of my head how I fixed. One problem I know that occured commonly was that an application isn't closed when you think it is, it's minimised, and you have to use the control panel on the emulator to close the application (under memory management somewhere).
  22. I have done some development using the .Net Compact Framework. For a fair amount of time I managed with the emulator (using VS 2003), but in the end I resorted to using an actual mobile device (in my case the XDAII which the company owned). If you have a device its possible to debug straight to it, which is in my opinion the best option. Unfortunately if you don't have an actual device you may be stuck with the annoyances that comes with the emulator.
  23. ' if path is a string object containing the full path then path.Substring(path.LastIndexOf("\") + 1)
  24. There isn't much difference really. My code stored the search into an array then iterated through this array. Your code uses a for each statement to iterate through without assigning it to an array first. Quite why your using Substring I can't say, you are basically telling it to use the entire string anyway (at least in the code you posted).
  25. I don't quite understand what that line of code is supposed todo, but based on your description this is what I think you want todo. Dim dirs() As String = Directory.GetDirectories(cmboLeft.Text) lvwLeftList.BeginUpdate() For i As Single = 0 To dirs.Length - 1 lvwLeftList.Items.Add(dirs(i)) Next lvwLeftList.EndUpdate() As a side note the code you posted doesn't work because of the following... - the method GetDirectories returns a string array - the method Items.Add() accepts (among other things) a string not an array Pay close attention to the Tooltips for each overload to see what they return or accept, this could help you solve alot of your problems on your own.
×
×
  • Create New...