Search Results - VBForums

Search:

Type: Posts; User: Evil_Giraffe

Page 1 of 13 1 2 3 4

Search: Search took 0.04 seconds; generated 57 minute(s) ago.

  1. Re: Collection was modified...or not

    No, in this instance you're not enumerating the Dictionary, you're enumerating a separate array. Try it without the ToArray and you're back to enumerating something out of the Dictionary. If you...
  2. Re: Collection was modified...or not

    jmc is right, it's the ByRef behaviour that is causing this. I'd prove it a different way though. First up, take this code:

    Module Module1

    Sub Main()
    Dim mTestDict As New...
  3. Replies
    20
    Views
    948

    VS 2010 Re: Threading and Listening to sockets

    You appear to be giving it an IPv6 address, in which case you need to tell the socket that's what sort of address it is by using AddressFamily.InterNetworkV6 rather than AddressFamily.InterNetwork as...
  4. Replies
    9
    Views
    159

    VS 2013 Re: Problem with extension method

    1) Writing the extension method in a C# library wouldn't help: it's the call that is the problem. The expression "tmp" in the first post evaluates to a type of Object, and VB disallows extension...
  5. Replies
    20
    Views
    948

    VS 2010 Re: Threading and Listening to sockets

    Is it an IPv4 address in your address textbox? txtPort contains a string convertable to an integer? Check the value in the endpoint variable before executing the erroring line (i.e. put a breakpoint...
  6. Re: Addressing a series of textboxes in a loop?

    An array is a fixed size mass of mutable state. If the collection isn't changing, an array seems unsuitable as well.
  7. Replies
    9
    Views
    159

    VS 2013 Re: Problem with extension method

    https://duckduckgo.com/?q=visual+basic+extension+method+object+late+binding

    First result:
    ...
  8. Replies
    23
    Views
    487

    VS 2005 Re: Question about threading.

    The more I read, the more I suspect it's an even-more-inappropriate-than-usual course assignment.
  9. Replies
    20
    Views
    948

    VS 2010 Re: Threading and Listening to sockets

    What's the exact error that it shows?
  10. Replies
    20
    Views
    948

    VS 2010 Re: Threading and Listening to sockets

    I've just pasted your code into a VS2010 project, and it didn't show any errors at compile time. What is the exact error you're seeing, and is a compile-time or a runtime error?
  11. Replies
    20
    Views
    948

    VS 2010 Re: Threading and Listening to sockets

    Actually, I think you might not need to deal with this here, as IIRC my testing indicated that BeginReceive never completes synchronously, even if there is data waiting to be received. If a BeginXXX...
  12. Replies
    20
    Views
    948

    VS 2010 Re: Threading and Listening to sockets

    That code has a subtle bug in it. When you call BeginXXX, if there is already something waiting to be done (e.g. if you call BeginReceive when there is already some data queued up waiting to be...
  13. Replies
    77
    Views
    2,849

    Re: GoTo is still alive!

    Just a note on the original topic of the thread (remember that? The "goto" keyword in C#? Anyone?)

    "goto" in C# is not a means to create spaghetti code because you cannot jump to just any label....
  14. Replies
    23
    Views
    487

    VS 2005 Re: Question about threading.

    Errr, that's what I meant Niya. You're not thinking about it right if you're checking the status of the thread rather than the higher level operation. But even then, it's often that you really just...
  15. Replies
    23
    Views
    487

    VS 2005 Re: Question about threading.

    I don't think anyone's asked this yet: Why do you want to check the status of a thread? That suggests a wrong approach to threading if you want to ask that question.
  16. Replies
    9
    Views
    290

    Re: Unhandled exception. . .

    My guess us that ExecutablePath returns a string that is less than 95 characters long...
  17. Re: All possible combinations of random letters.

    Presumably if your input contains repeated letters, you wouldn't want the duplicate outputs.
    For instance, if your input was "AABC", then you'd have an "AABC" output where the first A is the first A...
  18. VS 2010 Re: Threading or not - best way to regularly check/wait

    Also, don't think of Tasks compared to threads. Tasks are a much higher level abstraction of "work that needs to be done" along with associated ways of defining when it should be done (Schedulers)...
  19. VS 2010 Re: Threading or not - best way to regularly check/wait

    Does the textbox need to visually update every 200ms? That seems a little odd to me. Think of the UX: The textbox currently shows 0. The user types in 200 and clicks the Go button. The textbox jumps...
  20. Replies
    20
    Views
    948

    VS 2010 Re: Threading and Listening to sockets

    The only thing that class gives you is splitting received messages on a newline (you can't control the line separator) and lets you send/receive strings by encoding with ASCII (again, not...
  21. VS 2010 Re: Threading or not - best way to regularly check/wait

    What framework version are you targeting. With the additional context I'd say using Tasks would help you out a lot rather than creating all those threads (threads are super expensive to create and...
  22. VS 2010 Re: Threading or not - best way to regularly check/wait

    In the first case, I would investigate the API of the DLL to find a way of asking to be notified of the completion of the action, either by passing in a callback, or by handling an event, or some...
  23. Re: How to call something one time, then stop?

    Keep track of whether you've performed that action is the simplest way:

    Private _imageHasBeenSet As Boolean = False

    Private Sub Button_Press(blah As Blah)
    If Not _imageHasBeenSet Then
    ...
  24. Replies
    20
    Views
    948

    VS 2010 Re: Threading and Listening to sockets

    Instead of explicit threading, you should use asynchronous techniques that will callback to your code when data is received, clients connect to a listening socket, etc. You tell the socket to statr...
  25. Replies
    5
    Views
    142

    Re: iList - Where have it got it wrong

    Which means your actual code is this:


    Dim MyItemsList As IList(Of MyItems)

    Frankly, there is no benefit to declaring the field as type IList(Of ) rather than List(Of ). You are about to...
  26. Replies
    5
    Views
    142

    Re: iList - Where have it got it wrong

    You've only declared the field which can hold a list, you haven't supplied a list to put in that field. You want to add a New in that line to also initialise the field with an instance:


    Dim...
  27. Re: Detect if value is increasing or decreasing!?

    If there is a Scrolling event on the scrollbar, it might already have both the old and new values available, which would save you maintaining it yourself.
  28. Replies
    8
    Views
    190

    Re: Visual Basic 2010 coding help!

    Oh gosh. Have you not learnt how to construct a model and populate it from a data source? If that's not been covered yet then you're in for a very painful time.

    Essentially, it sounds like you...
  29. VS 2013 Re: Integer comparison function

    You're comparing two pictureboxes, to determine whether the cards represented in them are higher or lower? There's a few big-picture-issues here that are worth airing before getting to specifics.
    ...
  30. Replies
    13
    Views
    785

    VS 2013 Re: Multiple User Diary Application.

    Safer than, say, placing the administrator password in an accessible location so that the non-admin users can trivially get full administrative access to the computer? Yeah, I'd say that was safer.
    ...
  31. Replies
    13
    Views
    785

    VS 2013 Re: Multiple User Diary Application.

    Wow, seriously? No. Just no.



    Um, what?!
  32. Re: How can I reset a shared member of a Class, that is incremented with each instanc

    Can I ask what the requirement is that you're trying to fulfill by keeping a count of how many instances of the class you create? It's quite possibly something that has a far better solution than...
  33. VS 2013 Re: Have to make a check of which country the internetconnection is from??

    You would need to do a GeoIP lookup, that maps IP addresses to their approximate location.

    Note that even if the machine connecting to your server is in Denmark, the user may not be, as they can...
  34. Replies
    5
    Views
    843

    Re: Execution plan? What about them?

    The answer to all those questions is, predictably, "it depends".

    As I recall, a former colleague who was well versed in Oracle query optimisation (from a developer p.o.v., not a DBA) had a rule of...
  35. Replies
    1
    Views
    118

    VS 2010 Re: WPF - Value of checkbox in datagrid

    You should bind the checkbox column to a property on the object that the row is bound to. You don't go spelunking through the controls' state in WPF.
  36. Replies
    4
    Views
    254

    Re: Random property question

    You've not seeded the RNG. In .NET, it's encouraged to use the Random class rather than the Legacy functions, so you should create a single instance of the Random class, that will seed itself with...
  37. Replies
    9
    Views
    348

    Re: Loops in vb.net

    A big advantage of using sequences, as in my suggestion, is that you don't have to calculate the entire list before starting to work on the first element, and once you've finished working with an...
  38. Replies
    9
    Views
    348

    Re: Loops in vb.net

    Well, let's think about this. Dop we know ahead of time how many letters we want to loop up to? If we do, can we imagine a function that does it? I'm going to suppose there is a method we can call...
  39. Replies
    2
    Views
    228

    Re: xml simple stupid question

    If you have the XML in a file, why not just show the contents of the file, rather than trying to recreate it from the tree?
  40. Re: Need help with a multithreading problem

    Given that you're modifying UI controls in what you hope to be a non-UI thread, then no, it's not going to work. If you're animating two things on screen at the same time, you'll need to handle them...
Results 1 to 40 of 498
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.