Search:

Type: Posts; User: Lenggries

Page 1 of 9 1 2 3 4

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

  1. Replies
    8
    Views
    1,230

    Re: Get X/Y coordinates

    OK, but do you have a limit to the map. IE, I assume there's a top and left to the map, since you never mention a (-1,-1) coordinate, but is there a right or bottom tile, or does it go on forever? If...
  2. Replies
    8
    Views
    1,230

    Re: Get X/Y coordinates

    If the form is not divisible by 32, do you show a partial tile? If not, what do those pixels on the outside of outer most tiles of the map represent? I think you're being sloppy in how you handle...
  3. Replies
    8
    Views
    1,230

    Re: Get X/Y coordinates

    Ahhh... I get what you mean now. I can see a couple of potential problems:
    1. What if the height and width are not evenly divisible by 32?
    2. What if the mouse is not over the form?
    3....
  4. Replies
    8
    Views
    1,230

    Re: Get X/Y coordinates

    I don't have time right now to look into this in depth, but after a quick glance, instead of dividing everything by 32, have you tried dividing the height by the number of rows (5) and the width by...
  5. Re: Generating rectangles around a centre point in a spiral starting from the centre

    I would say that hardcoding is the worst way to implement this, so your question here is well worth asking.

    There are two general approaches you could take to compute all the coordinates:
    1:...
  6. Replies
    9
    Views
    2,614

    Re: Combination Picker

    Arnoutdv, I'm just glancing at your code... are you coming up with the indexes or permutations or combinations? It seems like you're counting permutations, but the OP specified combinations:
  7. Replies
    2
    Views
    966

    Re: About the easy famous unsolved problem

    That page is awesome! Thanks for sharing.
  8. Replies
    10
    Views
    2,495

    Re: Prime Numbers

    Yes, it's true, and it is fairly easy to prove. Let's take a smaller example: the case of the product of the first two primes, 2*3=6:

    In this case, all primes will have a remainder of 1 or 5. Why,...
  9. Thread: Poker stats.

    by Lenggries
    Replies
    8
    Views
    2,001

    Re: Poker stats.

    To Wikipedia!!!

    And yes, poker players often do play variants, though not often at actual casinos (casinos prefer simple standardized games that require very little rules interpretations, in order...
  10. Re: Member Variables Declared Without DataTypes

    It just declares it behind the scenes as a Variant. To some extent, whether a Variant is good or not is a matter of taste, although as I understand it, if performance is a concern, Variant isn't...
  11. Replies
    2
    Views
    742

    Re: Whats wrong with tis statement

    You're missing a closing parentheses, aka ')', for the Values portion

    Also, to answer your subject line, "tis" is what's wrong with tis statement ;)
  12. Replies
    7
    Views
    913

    Re: number only problem

    Alternatively, you can validate the string after the input:



    Private Sub Text1_Change()
    Dim strVal As String

    'use static local variable to manage reverting back to previous...
  13. Re: Callback Sub causes App to crash on Form_Unload

    Do you get a meaningful error message when the crash occurs? If so, what is it?
  14. Replies
    8
    Views
    1,680

    Re: Quotes in CSV File

    This is more of an Excel problem than a VB6 problem, as it is your client (aka MS Excel) that is hosing up the display of your data. I believe there are settings in excel you can use to instruct it...
  15. Replies
    10
    Views
    8,502

    Re: subtracting decimals - what am i missing?!

    What is and isn't obvious depends on how many math classes someone can still remember ;)

    Here's the basic rule for floating point numbers in different bases (bear in mind we are only talking about...
  16. Replies
    21
    Views
    1,756

    Re: RictTextBox Question

    All it takes is the right prescription medication, allergies, and a lot of missing sleep.

    To the OP... not sure if any of this will actually help you, since it has the side effect of changing the...
  17. Replies
    21
    Views
    1,756

    Re: RictTextBox Question

    I said FFFFFF - (Dark Blue), not just FFFFFF. Let's say your shade of dark blue is 991111 (bear in mind, in VB6, RGB values are actually ordered as BGR), then to get 991111 as your highlight color,...
  18. Replies
    21
    Views
    1,756

    Re: RictTextBox Question

    Yeah, what Bonnie said. If you want dark blue highlighting, you'll need to change the BackColor to FFFFFF - (Dark Blue)
  19. Replies
    5
    Views
    1,672

    Re: Face detection algorithms

    It's been a long while since I dealt with this stuff, but face recognition is just a specific form of pattern recognition, or pattern rec. There are many algorithms that can perform pattern rec...
  20. Replies
    5
    Views
    1,672

    Re: Face detection algorithms

    Given the type of data structures needed to support such algorithms, I'd never even think about doing that in VB6.
  21. Replies
    25
    Views
    2,471

    Re: error after adding another colum

    Well, ExpType also appears to be text, so just follow the example that already exists in your two statements. Although if ExpInvoice is text, do you still need to replace all the commas within with...
  22. Replies
    25
    Views
    2,471

    Re: error after adding another colum

    I see two mistakes.
    - In your UPDATE statement, you add "'" following the ExpInvoice value, but not before. And there is no single quote for that value at all in the INSERT statement. So what TYPE...
  23. Replies
    28
    Views
    3,221

    Re: Displaying Text from BMP Image?

    Why not just change it to a GIF with a transparent background?
  24. Replies
    3
    Views
    1,668

    Re: Method '~' of object '~' failed

    When in doubt, reboot the machine. If that doesn't work, re-register the DLL.
  25. Re: Image List must be initialized before it can be used.

    I ran into this once and it almost gave me a coronary. I'm so sorry you found this. Unfortunately, I don't recall how I resolved the issue, but a search of these forums found this solution:



    ...
  26. Re: Trial and error process to find a variable that its function value is known

    OK, there are a lot of problems with this code. The first of which is that calling this trial and error is a little misleading. Trial and error is for middle school math... what you are attempting to...
  27. Re: Calculating progress speed using byte count of data

    I am assuming the following:
    Picture1.Left = Picture2.Left when the song begins
    lngBytesPlayed is total number of bytes you have "captured"
    lngTotalBytes is the total size of the sound file


    ...
  28. Re: Help Needed Converting VB6 OpenProcess to .Net - Process Execution Speed

    I see two possibilities (this is without having any real idea of what ghost.exe does, by the way):

    1. This may be obvious, but just in case, can you confirm the results of the VB6 execution, .net...
  29. Re: Beat The Banker / Deal or No Deal Odds Calculation Help...

    I agree with your statement that "Logically you should always make the decision that has the best prospective outcome", but disagree on your assumption that the "best prospective outcome" is measured...
  30. Re: Beat The Banker / Deal or No Deal Odds Calculation Help...

    That's the key... you CAN'T play the (actual) game 1000 times. You only get to play once, and at least in the US version, you're generally dealing with life-altering quantities of money. This is why...
  31. Re: Beat The Banker / Deal or No Deal Odds Calculation Help...

    I'm afraid your going to have to roll your own algorithm. This forum discussion includes an excellent post on Deal or No Deal, including a few actual examples from the American version of the show....
  32. Replies
    11
    Views
    7,357

    Re: Pinochle Probability (again)

    It's only too much if you don't want the correct answer. With some smart pruning (aka, not entering branches if you can determine that no useful work can be done there), the algorithm can be...
  33. Replies
    11
    Views
    7,357

    Re: Pinochle Probability (again)

    Exactly, except for two things:
    - instead of (64,20-(i+j+k+l)), you'd use (96,20-(i+j+k+l)), where 96 = 120 cards - 24 aces
    - You'dd definitely need to use a larger numeric datatype. A long is only...
  34. Replies
    11
    Views
    7,357

    Re: Pinochle Probability (again)

    So it seems. It's a interesting mix of combinatorics, but the proof is in the pudding:
    - both algorithms I've shown produced the same answer for number of hands without aces around
    - that answer...
  35. Replies
    11
    Views
    7,357

    Re: Pinochle Probability (again)

    Basically, yes. As it turns out, this is much easier than I expected. In c#, again (and using the same Choose() function in my earlier post:



    private long[] CalculateAll()
    {
    long[] total...
  36. Replies
    11
    Views
    7,357

    Re: Pinochle Probability (again)

    First of all, as a lifelong Pinochle player, I'm tempted to ignore this post entirely on the principle that you are playing it wrong. Double deck? That's like eating tofurkey on Thanksgiving!
    ...
  37. Replies
    2
    Views
    1,785

    Re: intersection point slightly off

    Yeah... what Jemidiah said.

    But to go further, why are you mucking around with Integers at all? In your comments you linked to a forum post which gave you your getnode() function, and the only...
  38. Re: Help with a Treeview problem (moving items to the end)

    Your problem is that you are sorting the names of the nodes and not the nodes themselves. When you swap things within SortChild(), you are merely swapping the names. Instead, you need either swap the...
  39. Replies
    2
    Views
    2,198

    Re: Techniques on oral/mental math

    Repetition, repetition, and repetition.

    Once your son gets into more advanced math, such as trigonometry, there are a few tricks to the trade. For example, if in a test in which the students may...
  40. Replies
    7
    Views
    1,755

    Re: vb6 Form Interface. Help

    It looks like some sort of spread or datagrid control to me. I know you can recreate that interface using Farpoint's spread control, but I suspect there are other options out there as well.
Results 1 to 40 of 351
Page 1 of 9 1 2 3 4



Click Here to Expand Forum to Full Width