Search Results - VBForums

Search:

Type: Posts; User: Evil_Giraffe

Page 1 of 13 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    4
    Views
    125

    VS 2012 Re: problem with timer

    My guess from reading your code is that you want the following to happen:

    1) When the form loads, show "15:00" on a label, and wait until that time arrives.
    2) When it is 15:00, run the "Do Some...
  2. Replies
    2
    Views
    81

    VS 2013 Re: Declaring Variables in Loops

    Also, this could be settled by consulting the VB language reference for Scope:

    http://msdn.microsoft.com/en-us/library/1t0wsc67.aspx:
  3. Replies
    2
    Views
    81

    VS 2013 Re: Declaring Variables in Loops

    Except by doing Dim arrayCheck(2) As Integer you've declared a variable and initialised the array. Try adding this to show that an array variable will retain its value if you don't reinitialise the...
  4. Replies
    2
    Views
    97

    Re: copying binary data from text file

    IF the file contains text and binary data, I'd guess that it's a binary file where some of the data should be interpreted as character data. At which point you should read it out as binary, find the...
  5. Re: How to best pass a value to a parameter?

    The difference between SubA and SubB in this scenario is only in terms of looking at the code. At execution time that variable in SubB will be inlined and the two will execute identically.

    Don't...
  6. Replies
    15
    Views
    326

    Re: Hungarian Notation?

    Actually, not quite. Hungarian Notation as known and understood by the majority of developers was developed by technical authors based on a fundamental misunderstanding of a much more useful and less...
  7. Replies
    25
    Views
    496

    VS 2010 Re: iteration through background workers

    I'd actually not recommend Tasks to you right now. Tasks are a great implementation of various async patterns (although I personally have some trepidation linking directly to their API) but unless...
  8. Replies
    38
    Views
    680

    Re: Zero-length or Nothing

    I'm not just talking about TryParse. I'm talking about the more general TryXXX Pattern. I work with rather large information processing systems that don't take a huge relative amount of user input...
  9. Replies
    25
    Views
    496

    VS 2010 Re: iteration through background workers

    If you were introducing background workers because you had multiple CPU-bound operations, I would advise you to read the file and put the definition of each proxy to check into a ConcurrentQueue, and...
  10. Replies
    38
    Views
    680

    Re: Zero-length or Nothing

    FTFY. There is nothing unclear or inelegant about the approach, you're just not used to it. You'd better get used to it though, because as the languages and frameworks increasingly adopt asynchronous...
  11. Replies
    38
    Views
    680

    Re: Zero-length or Nothing

    It's a typically functional style of writing code, which C# is increasingly leaning towards. If you've written any Javascript in the last 5 years you'll be very used to this pattern as well. Not so...
  12. Replies
    38
    Views
    680

    Re: Zero-length or Nothing

    That's because there is an answer to the question "What is this Control's text value?", it's just that the answer might be a zero-length string.


    If you've considered the problem and decided that...
  13. Replies
    38
    Views
    680

    Re: Zero-length or Nothing

    Returning Nothing indicates that there is no answer. Returning a zero-length string indicates there is an answer, and the answer is a zero-length string.

    I fail to see why people get confused over...
  14. Replies
    2
    Views
    109

    VS 2013 Re: VB.net Unit Testing Forms

    The trick to unit testing UIs is to not have your logic in the code behind of the UI, but in separate classes that know nothing about the UI. Most UI architecture patterns revolve around separating...
  15. Replies
    2
    Views
    119

    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...
  16. Replies
    10
    Views
    227

    Re: multithread not working?!?

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

    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...
  18. Replies
    10
    Views
    227

    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...
  19. Replies
    8
    Views
    280

    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 >...
  20. 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

    ...
  21. Replies
    13
    Views
    529

    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...
  22. 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...
  23. 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...
  24. Replies
    20
    Views
    1,055

    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...
  25. Replies
    9
    Views
    223

    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...
  26. Replies
    20
    Views
    1,055

    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...
  27. 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.
  28. Replies
    9
    Views
    223

    VS 2013 Re: Problem with extension method

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

    First result:
    ...
  29. Replies
    23
    Views
    672

    VS 2005 Re: Question about threading.

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

    VS 2010 Re: Threading and Listening to sockets

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

    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?
  32. Replies
    20
    Views
    1,055

    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...
  33. Replies
    20
    Views
    1,055

    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...
  34. Replies
    77
    Views
    3,353

    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....
  35. Replies
    23
    Views
    672

    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...
  36. Replies
    23
    Views
    672

    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.
  37. Replies
    9
    Views
    383

    Re: Unhandled exception. . .

    My guess us that ExecutablePath returns a string that is less than 95 characters long...
  38. 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...
  39. 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)...
  40. 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...
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.