Search Results - VBForums

Search:

Type: Posts; User: Evil_Giraffe

Page 1 of 13 1 2 3 4

Search: Search took 0.05 seconds.

  1. Replies
    2
    Views
    95

    VS 2010 Re: GCSE Programming Hekp please?

    May I quickly ask what exam board and course you are studying for? There's a lot that's questionable about the above code that may be perfectly acceptable for your course, so there's no point going...
  2. Replies
    10
    Views
    180

    Re: multithread not working?!?

    Also, you probably shouldn't be using the Thread class directly, but rather a higher-level abstraction like a BackgroundWorker.
  3. Replies
    10
    Views
    180

    Re: multithread not working?!?

    Yes, thread1.Start will start the thread. Your original post suggested you thought that it should execute the thread's method when creating the thread before you stepped onto the thread1.Start line...
  4. Replies
    10
    Views
    180

    Re: multithread not working?!?

    Well, no, it wouldn't. You haven't started the thread yet, so that function won't be executing. You've simply passed it the address of that method so that the thread knows what code to execute when...
  5. Replies
    8
    Views
    251

    VS 2010 Re: byte array cleaning

    Whilst I'm usually the first to question a LINQ one-liner, surely all we need to do in this instance is the following:

    bytes.Where(Function(val As Byte, index As Integer) index Mod 115 >...
  6. Re: The easiest way to not use parallel array ?

    I'd have the dual image logic in a separate class, looking maybe something like this:

    Imports System.ComponentModel

    Public Class EmployeeViewModel
    Implements INotifyPropertyChanged

    ...
  7. Replies
    13
    Views
    424

    Re: Decompiler suppression

    Obfuscation wouldn't even help with this, if you embed the connection details in the code it will show up as a string inside the assembly without any decompiling at all.


    Indeed, frankly you...
  8. 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...
  9. 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...
  10. Replies
    20
    Views
    1,024

    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...
  11. Replies
    9
    Views
    197

    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...
  12. Replies
    20
    Views
    1,024

    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...
  13. 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.
  14. Replies
    9
    Views
    197

    VS 2013 Re: Problem with extension method

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

    First result:
    ...
  15. Replies
    23
    Views
    588

    VS 2005 Re: Question about threading.

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

    VS 2010 Re: Threading and Listening to sockets

    What's the exact error that it shows?
  17. Replies
    20
    Views
    1,024

    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?
  18. Replies
    20
    Views
    1,024

    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...
  19. Replies
    20
    Views
    1,024

    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...
  20. Replies
    77
    Views
    3,158

    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....
  21. Replies
    23
    Views
    588

    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...
  22. Replies
    23
    Views
    588

    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.
  23. Replies
    9
    Views
    341

    Re: Unhandled exception. . .

    My guess us that ExecutablePath returns a string that is less than 95 characters long...
  24. 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...
  25. 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)...
  26. 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...
  27. Replies
    20
    Views
    1,024

    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...
  28. 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...
  29. 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...
  30. 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
    ...
  31. Replies
    20
    Views
    1,024

    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...
  32. Replies
    5
    Views
    154

    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...
  33. Replies
    5
    Views
    154

    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...
  34. 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.
  35. Replies
    8
    Views
    203

    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...
  36. 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.
    ...
  37. Replies
    13
    Views
    920

    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.
    ...
  38. Replies
    13
    Views
    920

    VS 2013 Re: Multiple User Diary Application.

    Wow, seriously? No. Just no.



    Um, what?!
  39. 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...
  40. 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...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.