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
    12
    Views
    193

    Re: Communication DB Location

    Why not just give the database machine a network name that is part of the config supplied with the app? This solution is completely overkill IMO.
  2. Replies
    7
    Views
    195

    Re: Using Percentages

    The CalculateCommission function shouldn't take the commission percentage. It is responsible for calculating the commission on a given value of sales, therefore it is responsible for working out the...
  3. Replies
    19
    Views
    361

    VS 2013 Re: Where did my stuff go?

    Another thing you might want to consider is using a source control system. When you get to a "known good" point, commit the current code to source control and then you can always go back to a...
  4. VS 2013 Re: HowTo Make Natural CopyToClipboard For Use Outsite The Program [Simple!]

    You don't mean copy information from your program to the clipboard so that other programs can get it?

    You actually mean have a program that will copy out of another program?

    How would you...
  5. VS 2013 Re: HowTo Make Natural CopyToClipboard For Use Outsite The Program [Simple!]

    Did you try a web search for this? https://duckduckgo.com/?q=vb.net+clipboard
  6. VS 2010 Re: Nested Class - Prevent Instantiation of Nested Class

    Enforcing this will be complicated, are you sure it's worth it? What is the issue if an application instantiates an instance of the class?

    You'd also want the constructor to be just Friend if you...
  7. Re: Real time updating of label in for each loop

    My stance was that if it takes long enough to warrant giving the user visual feedback, it warrants not blocking the UI thread.



    ...other than the pedantic and allowing Windows to do its thing...
  8. Re: Real time updating of label in for each loop

    A function running on the UI thread shouldn't be running for long enough to warrant updating the UI in the middle of it. If you have a loop running for that long you should either:
    1) run that loop...
  9. Re: [RESOLVED] Commutative Property of Objects

    If it ain't commutative, it ain't equality. End of.
    Maybe we can relax the constraints a little and take your non-transitive example and call it equality, but it ain't really so either. I just can't...
  10. Re: Commutative Property of Objects

    Nope, not certain, hence "potential to" and "may break stuff".

    However, it's not things like IEqualityComparer and the like that you need to be thinking of. It's more that the equality operator...
  11. Re: Commutative Property of Objects

    I would not override the = operator in any way that lost commutativity. The = operator has the potential to be called by the framework in unexpected places, and may break stuff if it doesn't follow...
  12. Replies
    6
    Views
    247

    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...
  13. Replies
    2
    Views
    108

    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:
  14. Replies
    2
    Views
    108

    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...
  15. Replies
    2
    Views
    123

    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...
  16. 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...
  17. Replies
    15
    Views
    475

    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...
  18. Replies
    25
    Views
    565

    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...
  19. Replies
    38
    Views
    759

    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...
  20. Replies
    25
    Views
    565

    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...
  21. Replies
    38
    Views
    759

    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...
  22. Replies
    38
    Views
    759

    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...
  23. Replies
    38
    Views
    759

    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...
  24. Replies
    38
    Views
    759

    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...
  25. Replies
    2
    Views
    134

    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...
  26. Replies
    2
    Views
    157

    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...
  27. Replies
    10
    Views
    268

    Re: multithread not working?!?

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

    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...
  29. Replies
    10
    Views
    268

    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...
  30. Replies
    8
    Views
    325

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

    ...
  32. Replies
    13
    Views
    641

    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...
  33. 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...
  34. 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...
  35. Replies
    20
    Views
    1,145

    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...
  36. Replies
    9
    Views
    266

    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...
  37. Replies
    20
    Views
    1,145

    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...
  38. 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.
  39. Replies
    9
    Views
    266

    VS 2013 Re: Problem with extension method

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

    First result:
    ...
  40. Replies
    23
    Views
    772

    VS 2005 Re: Question about threading.

    The more I read, the more I suspect it's an even-more-inappropriate-than-usual course assignment.
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.