Search:

Type: Posts; User: theoobe

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds; generated 2 minute(s) ago.

  1. Replies
    3
    Views
    1,919

    Yes there is a way. In visual studio, go to the...

    Yes there is a way. In visual studio, go to the "View" menu, then "Other windows", then "Document Outline". From there find the RichTextBox and MenuStrip controls on the Document Outline tree, and...
  2. Replies
    2
    Views
    2,542

    using System; using System.Collections.Generic;...

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Text.RegularExpressions;

    namespace ConsoleApplication2
    {
    class Program
    {
  3. Replies
    18
    Views
    9,906

    * cringes at the over-use of the "var" keyword. *

    * cringes at the over-use of the "var" keyword. *
  4. Replies
    18
    Views
    9,906

    Random Class (System)...

    Random Class (System)

    Have a read. :)
  5. Replies
    1
    Views
    1,341

    Sounds like a DataGridView is what you need.

    Sounds like a DataGridView is what you need.
  6. Replies
    10
    Views
    3,633

    Probably needs casting... if(dr.Read()) ...

    Probably needs casting...


    if(dr.Read())
    username = (String)dr["username"];
  7. Replies
    10
    Views
    3,633

    Use square brackets... dr["username"] ...

    Use square brackets...


    dr["username"]

    Returning to my earlier point about disposing your database objects, it is bad practice to leave database connections lingering, which is what you are...
  8. Replies
    10
    Views
    3,633

    OleDbDataReader dr = cmd.ExecuteReader(); And...

    OleDbDataReader dr = cmd.ExecuteReader();

    And


    if (dr.Read())

    The clue was in the exception.

    Also don't forget to Dispose cmd, db and dr, or better yet, use 'using' statements.
  9. Use the full path. So, rather than... ...

    Use the full path. So, rather than...


    [DllImport("MyLib.dll")]

    ...you must use something like...


    [DllImport("c:\inetpub\wwwroot\MyWebPage\bin\MyLib.dll")]
  10. Just guessing here, but the delay could be from...

    Just guessing here, but the delay could be from blocking on receive. My guess is based on you using Send rather than BeginSend.
  11. Replies
    5
    Views
    5,464

    You mention your local IP address being ipv4, so...

    You mention your local IP address being ipv4, so I'm assuming your "public(remote)" ip address is ipv6? I've never used ipv6 before, but a quick test...


    // a random ipv6 address
    String test_ip...
  12. Replies
    2
    Views
    2,763

    Nevermind. ConcurrentDictionary seems to be what...

    Nevermind. ConcurrentDictionary seems to be what I need.
  13. Replies
    2
    Views
    2,763

    Is this thread safe?

    using System;
    using System.Collections.Generic;

    namespace core.Extensions
    {
    class ConcurrentList<T>
    {
    private List<T> Items { get; set; }
    private object Locker { get;...
  14. Replies
    6
    Views
    2,404

    You might want to learn the basics of C# before...

    You might want to learn the basics of C# before worrying about things like connecting to databases. Variables prefixed by an access modifier would never be found in a constructor.
  15. Replies
    6
    Views
    2,370

    Since you don't appear to need the needle's...

    Since you don't appear to need the needle's starting index or anything else other than a bool to confirm the needle's existance in the haystack, you could use .Contains instead...


    String needle...
  16. There are two ways that immeditately spring to...

    There are two ways that immeditately spring to mind. First is to pass the arguments in the Process.Start, eg.


    String name = "foo";
    String password = "bar";
    String args = "name=" + name +...
  17. What is the exception message? Normally when the...

    What is the exception message? Normally when the Xml reader fails to read a document it will tell you where it failed eg. (3, 4) meaning column 3, row 4.
  18. You could use some win32 functions to get the...

    You could use some win32 functions to get the text content of an external control. You gave the example of notepad:


    using System;
    using System.Text;
    using System.Runtime.InteropServices;...
  19. Thread: Speech to text

    by theoobe
    Replies
    3
    Views
    2,030

    System.Speech.Recognition Namespace ()...

    System.Speech.Recognition Namespace ()
  20. Thread: Thread wait

    by theoobe
    Replies
    8
    Views
    2,143

    You could consider using the BackgroundWorker...

    You could consider using the BackgroundWorker object which includes a convenient RunWorkerCompleted event which fires when the thread dies.
  21. Replies
    2
    Views
    3,115

    You use P/Invoke ( Platform Invoke Tutorial (C#)...

    You use P/Invoke ( Platform Invoke Tutorial (C#) ) to communicate with unmanaged libraries from C#. I have to say though, using P/Invoke to perform such a very simple task as calculating a character...
  22. ListBox.SelectedIndexChanged Event...

    ListBox.SelectedIndexChanged Event (System.Windows.Forms)

    Use this event to change the contents of the label and picturebox.
  23. If you're intending to have many clients...

    If you're intending to have many clients connecting to your server at the same time I recommend you avoid "thread per client" as it will end up slowing your computer down. Instead you could consider...
  24. Replies
    5
    Views
    2,107

    Strangely, changing the read length to 8 results...

    Strangely, changing the read length to 8 results in a byte array containing 16 elements. The 8 bytes expected in the OP's expected output, followed by an additional 8 bytes. I don't really...
  25. Replies
    8
    Views
    1,958

    You're welcome.

    You're welcome.
Results 1 to 25 of 211
Page 1 of 9 1 2 3 4