Search results for query: *

  1. K

    File IO in Multi-threaded Environment

    Suppose I want to over-write one file with another but I want to backup the over-written file. Use io.file.replace, right? Now what if I want to check to make sure there is adequate disk space first? Is it possible that another thread can write a file to the hard drive between my disk space...
  2. K

    Okay to Declare DataTable In a Structure?

    Like I said, I like to use structures to group friend variables. I have a program which utilizes a treeview control. The tree structure is loaded into a datatable from a database. I need the datatable. I declare the datatable in a structure called fNodes along with a few other friend variables...
  3. K

    Okay to Declare DataTable In a Structure?

    I often use structures to group various friend variables into logical categories. Is there any reason why I shouldn't declare a datatable in a structure? I ask because I'm not clear on some of the memory limitations of various objects in .net.
  4. K

    Most Efficient Way To Declare Classes

    Hmm. Thank you; that is helpful. I've been using vb2005 since its inception but lately I have come to feel like I'm still locked into the old way of doing things. I'm using classes as if they were code modules. I've just had a hard time getting my head wrapped around with the way .net handles...
  5. K

    Most Efficient Way To Declare Classes

    Wow. How about class size and complexity? I've tended to code large classes, often incorporating over a dozen different related procedures - much like code modules in older versions of vb. That seems like the wrong strategy if I were to go with a narrow-scope, instantiate and discard practice...
  6. K

    Most Efficient Way To Declare Classes

    That's pretty much what I thought. That just seems wasteful of memory. If a class is going to be used multiple times during the lifetime of the application, does it make more sense to instantiate it once as a friend or public variable so that it doesn't continue to go out of scope and make more...
  7. K

    Most Efficient Way To Declare Classes

    I'm not exactly a newbie but I need a better understanding of how .net deals with instances of classes that are no longer used. The way I understand it, the garbage collector will only reclaim resources when it needs to. So if I declare an instance of a class with a procedure-level variable...
  8. K

    Garbage Collection of Nodes Removed From Treeview Control

    If I remove a node from the treeview control like this: treeview1.selectednode.nodes(0).remove without first assigning the node to a variable, is that node actually disposed of or is it floating out there in limbo - taking up resources? If it is just floating in limbo, can the garbage...
  9. K

    ASP.Net Future

    Everyone knows about the extreme dominance of the windows platform on the desktop which makes learning to be a windows programmer a no-brainer. But Windows has no such edge on the web. Hosting is more expensive with no real extra value. Linux is pretty much the standard there. I'm curious what...
  10. K

    Refering To Objects By Strings

    Sorry if this is a real basic question but I can't seem to find how to refer to an object with a simple string variable. If a user wants to set a default font, for instance, I want to be able to persist that preference on the hard drive by storing a string representation of the font - like it's...
  11. K

    Fastest String Search

    I'm working on an application which needs to search through every word in a rich text box and match individual words and phrases to those in a database. I'm thinking it would be faster to save the text to a string class first and search through it rather than through the rich text box itself...
  12. K

    Removing Text Coloration In RichTextBox

    Yeah, it's not hard to work around - just a little sloppy. I'm suprised there isn't something like a RichTextBox.ClearRTF method to avoid having to specify the default color. It seems like such an obvious capability you would want to build into the control. I was thinking I must be missing it...
  13. K

    Removing Text Coloration In RichTextBox

    The rich text box control uses the rtf code 'cf0' to denote default text color. It builds a color table to define other colors which are used in the rtf document in the order in which they appear. If the first colored word is red for instance, the rtf code 'cf1' is used to define red. Is there...
  14. K

    Need Controls like MS Office ones

    Okay guys, thanks for the opinions. I'll probably purchase the set in the near future. Sharp seems to have the most bang for the buck.
  15. K

    Need Controls like MS Office ones

    Anyone have any experience with the Sharp Library or know of an independent review of the product? It looks really nice and the cost seems reasonable but two things concern me: 1. Looking at the release version history, there were an awful lot of bug fixes - 47 in the last three releases which...
  16. K

    Public Variables in VB.Net

    Yes, I was talking about globals. Thank's for the tip about the my.setting object! I didn't know about that. Now we have a standard object for storing preferences and other settings.
  17. K

    Public Variables in VB.Net

    That's exactly what I did in vb6. I've just gotten the impression from more experienced programmers that public variables should be avoided if at all possible. I know that they consume stack space. Other than that issue, is putting them in a class versus just declaring them public just a matter...
  18. K

    Public Variables in VB.Net

    Hi everyone! This is my first post here. I'm yet another vb6 coder finaly taking the .net plunge. :eek: If I understand the OOP concept correctly, there really is no place for public variables in it. I know vb.net still allows it but it doesn't seem to fit the new paradigm. In vb6, I often used...
Back
Top