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
    13
    Views
    360

    VS 2008 Re: Properties of sub-classes?

    It seems to me that when the user selects an attack, Fighter A (the attacker) is asked for something like an Attack object (maybe with a ChooseAttack() method?), which might just be a simple number...
  2. Replies
    13
    Views
    360

    VS 2008 Re: Properties of sub-classes?

    Sort of, yes.



    I'd start by asking why you want to get _Attack(x)._Hit(y)._Texts(z)? What has determined the values of x, y and z? What are you going to do with the return? There's behaviour...
  3. Replies
    9
    Views
    249

    Re: Creating traffic simulator ??

    So what you want to do is create an application that does basically what another application does. That's fine.

    So... the fact that you're asking about how to draw the traffic lights suggests you...
  4. Replies
    13
    Views
    360

    VS 2008 Re: Properties of sub-classes?

    Yes, this approach would work the same, where it would need to vary is if you are using Structs instead of Classes, at which point you need to take into account the pass-by-value semantics that go...
  5. Replies
    5
    Views
    159

    VS 2012 Re: Encryption

    Protecting information requires more than just "encryption". You actually need to think about the system as a whole. When and where is the information decrypted? How are you protecting the keys used...
  6. Replies
    4
    Views
    145

    VS 2012 Re: Auto Version Increment Add-In

    Does the built-in method of putting a * in the version number in the AssemblyInfo not meet your needs? Are you using a build server to produce your builds?
  7. Replies
    13
    Views
    288

    Re: Date Range

    Because it protects you against SQL injection attacks. Protecting the connection string is an entirely orthogonal matter that, agreed, needs to be considered, but a) doesn't make query parameters...
  8. Replies
    9
    Views
    264

    VS 2013 Re: Why can;t VB.net do simple division?

    Hmm, I was thinking that that was ideal. :)
  9. VS 2010 Re: InvalidOperationException error was unhandled..

    Okay, lots of things to address here, I'll start with this one:



    I assume that you're referring to the practice of making the fields of a class Public. As you've figured, Public means that a...
  10. Replies
    9
    Views
    264

    VS 2013 Re: Why can;t VB.net do simple division?

    Don't multiply by 100, instead use the Percentage numeric formatter. This takes a fractional value and displays it as a percentage respecting the user's culture settings:
    ...
  11. Replies
    2
    Views
    98

    Re: place holder

    I believe you're referring to what I've mostly heard called a watermark, but on searching for some implementation, one of these links also claims the "official" name is cue banner. The WinForms...
  12. Re: [Help] Code locked for some reason but msgbox unlock it what the **** ?

    If the MsgBox call is allowing your program to continue then I would hazard a guess that the code is being allowed to continue by the processing of another event on the UI thread - does this event...
  13. Re: Using a generic list to store a collection of class objects

    Because that's what was asked for:



    Also, for a real-world reason, you would potentially be enumerating the collection of CommunityEvents multiple times over the course of time. If you don't...
  14. Replies
    8
    Views
    260

    Re: Help on Union of Arrays

    :confused:
  15. Re: Using a generic list to store a collection of class objects

    Since the instructions refer to "using LINQ" to load the collection, you probably don't want to ToArray the ReadAllLines, and you don't want to use a For Each loop either.

    ReadAllLines returns an...
  16. Replies
    9
    Views
    281

    Re: Need some help with a function

    Are you supposed to be drawing a square with the # characters? If so you will need to add n-2 spaces between the two # characters (since you've figured out how to write n # characters then this...
  17. VS 2013 Re: Tcp Client/Server - Client messages problem?

    Nope, you're barking up the wrong tree there. Take a look at what you do when a client connects:


    Private Sub Listening(ByVal Port As Integer)
    Try
    Listener = New...
  18. Re: [RESOLVED] Adding data to a varuble textbox

    Well I was going to post a snarky comment about how that would be documented in the language spec and post a link to the relevant page of the language reference on MSDN, but what do I see when I look...
  19. Re: Adding data to a varuble textbox

    No, what you should do is stop storing application state in user controls.

    You should not retrieve the current value from the string that appears in a textbox; you should store the current value...
  20. Replies
    2
    Views
    171

    VS 2010 Re: vb.net facebook poster

    What you should do is use the API rather than trying to emulate a browser. The Facebook site doesn't obviously link to any .NET client libraries, so you might need to do a search for one that you can...
  21. Replies
    31
    Views
    597

    VS 2010 Re: Help me understand Generics

    Maybe you meant that you've never needed to define your own generic class, but I can assure there are plenty of use cases for doing so.
  22. Replies
    31
    Views
    597

    VS 2010 Re: Help me understand Generics

    Perhaps you actually want your class to be non-generic, like this:

    Class MyGenericList
    Inherits List(Of MyGeneric)

    In this instance, because you haven't said "(Of MyGeneric)" as...
  23. Replies
    31
    Views
    597

    VS 2010 Re: Help me understand Generics

    Inside the class MyGenericList(Of MyGeneric), the "MyGeneric" is a type variable, and you haven't defined what the type is. It is only when you instantiate one and make it a "closed generic" (i.e.,...
  24. Replies
    9
    Views
    257

    Re: Multithreading many times.

    If you're writing an RSS Checker then your threads are going to spend most of their time blocking waiting for network responses. In this case I prefer using an asynchronous call which doesn't require...
  25. Re: Is creating subroutines instead of nested ifs a waste or inefficient.

    Whilst I agree that it's worth taking a performance hit for more maintainable code, I've got to question whether there would be any performance hit in this case. If you build with a Release profile,...
  26. Re: 2 elementary questions about vb.net function calls

    A Release configuration will have Optimisations on by default. You are using a Release configuration for performance testing, right?

    A Debug configuration will variables around for longer so that...
  27. Replies
    12
    Views
    439

    Re: Decimal point

    The error is that you're calculating the amount of VAT incorrectly. The value of VAT is not 123.6798, it is actually 123.67 in this case. You need to round/truncate (depending on the business rules)...
  28. Replies
    14
    Views
    399

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

    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...
  30. Replies
    19
    Views
    429

    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...
  31. 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...
  32. 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
  33. 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...
  34. 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...
  35. 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...
  36. 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...
  37. 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...
  38. 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...
  39. Replies
    6
    Views
    284

    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...
  40. Replies
    2
    Views
    126

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