Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
S

Steve

@Steve
About
Posts
8
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Beginners question
    S Steve

    I can't see where your DataAccessSelectClass is coming from? And as it seems, neither can the compiler :-D For the example code you've posted, you should be using

    Text1.Text = Class1.Class11();

    That should give you what you need. Another thing to consider is, if you're going to just return a string that's not going to change, why not set it up as a public const string or as read only property? Steve.

    C# question

  • startup form
    S Steve

    You could do this... I'm not sure this is exactly what you're after but it's a way to set a "startup" form on first run. What you need to do is have an XML config file with a startup form setting that you read. You can then show the required form, after launching a blank, invisible startup form. The thing is, you're not actually changing the "startup" form though. You are however changing the visible form to the required, which is all the user really knows about. So what you want to do, is possible - but not in a pure sense.

    Visual Basic csharp tutorial question

  • Cross Form Method Access
    S Steve

    Another way to do this would be to implement an MVP or similar (MVC, Passive Screen, Supervising Controller etc.) pattern. That way you could raise the event from the view, into the associated presenter, which can Notify through a model to anywhere in the application that uses that model. Making the event not dependant on the form. Of course, this might not be viable. It's something to think about though... Take a look here[^] for more info on the patterns

    Visual Basic csharp

  • How to select specific data from textfile
    S Steve

    Your problem is that you're only reading the first line of the file. The ReadLine call needs to be a recurrent call, based on the return value of the method. e.g. (from MSDN) Dim input As String input = sr.ReadLine() While Not input Is Nothing 'Do something with the input 'Read the next line of input input = sr.ReadLine() End While This will continue to read the file until there is no further input returned by the ReadLine() call. Then you'll have to compare the returned input string to whatever you want to catch, either using a regex or a string constant (in the case of a marker string or something that won't change) to get the particular peice of info you're after. I would add do it something like this... Dim input As String input = sr.ReadLine() While Not input Is Nothing If (input.CompareTo(stringConstant) = 0) 'do whatever with the data input = Nothing Else input = sr.ReadLine() End If End While

    Visual Basic question help testing beta-testing tutorial

  • Determining file state (open or closed)
    S Steve

    I would move the call to objSw.Close() into the finally block, as it will always be executed there and then you don't have to worry about any exceptions that may or may not have occured. You should do this on most occasions to make sure that the connection gets closed correctly no matter what happens. To overcome the warning, set the objects to null on declaration. This means they are explicity set to null, and you're not inferring anything.

    C# question csharp tutorial

  • The ConnectionString property has not been initialized !
    S Steve

    Nader Elshehabi wrote:

    You shouldn't dispose your connection until you don't need it anymore in the current session. If you want to clear you DataGridView -as I understood from your reply-, then you should call the DataGridView.Rows.Clear() method before filling it again.

    This is what I was getting at - sorry for the lack of detail.

    C# help database

  • The ConnectionString property has not been initialized !
    S Steve

    Try clearing your data objects explicitly rather than disposing the connection.

    C# help database

  • Bird Flu
    S Steve

    I think you're getting a bit panicky. If it's truly airborne, locking yourself in your house won't do a thing. It may limit your exposure to others but it won't stop you contracting it if it's in your neighbourhood. Unless you have a nuclear fallout shelter in your basement :) If you are seriously that concerned, my answer would be water purification equipment (a simple, high grade purifier, and some emergency purification tablets), canned foods including things like corn, peas etc. freezable food. If you have freezer space, pre-cook meals, put them in tupperware containers and freeze them. You should be able to get 2 weeks worth of meals. 2 weeks isn't all that long as long as you've got water, canned food and good company... Oh - and an XBOX. :laugh:

    The Lounge question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups