Search Results - VBForums

Search:

Type: Posts; User: Lenggries

Page 1 of 9 1

Search: Search took 0.02 seconds.

by Lenggries
Replies
8
Views
775

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

by Lenggries
Replies
8
Views
775

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

by Lenggries
Replies
8
Views
775

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

by Lenggries
Replies
8
Views
775

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. Thread: Generating rectangles around a centre point in a spiral starting from the centre

by Lenggries
Replies
4
Views
1,420

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

by Lenggries
Replies
9
Views
1,587

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:

by Lenggries
Replies
2
Views
770

Re: About the easy famous unsolved problem

That page is awesome! Thanks for sharing.

by Lenggries
Replies
10
Views
1,768

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

by Lenggries
Replies
8
Views
1,561

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. Thread: [RESOLVED] Member Variables Declared Without DataTypes

by Lenggries
Replies
2
Views
484

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. Thread: Whats wrong with tis statement

by Lenggries
Replies
2
Views
543

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 ;)

by Lenggries
Replies
7
Views
514

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

by Lenggries
Replies
6
Views
620

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. Thread: Quotes in CSV File

by Lenggries
Replies
8
Views
557

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. Thread: subtracting decimals - what am i missing?!

by Lenggries
Replies
10
Views
1,015

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

by Lenggries
Replies
21
Views
977

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

by Lenggries
Replies
21
Views
977

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

by Lenggries
Replies
21
Views
977

Re: RictTextBox Question

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

by Lenggries
Replies
5
Views
700

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

by Lenggries
Replies
5
Views
700

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.

by Lenggries
Replies
25
Views
1,038

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

by Lenggries
Replies
25
Views
1,038

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. Thread: Displaying Text from BMP Image?

by Lenggries
Replies
28
Views
1,254

Re: Displaying Text from BMP Image?

Why not just change it to a GIF with a transparent background?
24. Thread: Method '~' of object '~' failed

by Lenggries
Replies
3
Views
414

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

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

by Lenggries
Replies
7
Views
2,949

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. Thread: Trial and error process to find a variable that its function value is known

by Lenggries
Replies
10
Views
739

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. Thread: Calculating progress speed using byte count of data

by Lenggries
Replies
9
Views
566

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. Thread: Help Needed Converting VB6 OpenProcess to .Net - Process Execution Speed

by Lenggries
Replies
12
Views
1,306

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. Thread: Beat The Banker / Deal or No Deal Odds Calculation Help...

by Lenggries
Replies
7
Views
3,514

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. Thread: Beat The Banker / Deal or No Deal Odds Calculation Help...

by Lenggries
Replies
7
Views
3,514

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. Thread: Beat The Banker / Deal or No Deal Odds Calculation Help...

by Lenggries
Replies
7
Views
3,514

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

by Lenggries
Replies
11
Views
1,783

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

by Lenggries
Replies
11
Views
1,783

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

by Lenggries
Replies
11
Views
1,783

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

by Lenggries
Replies
11
Views
1,783

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

by Lenggries
Replies
11
Views
1,783

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. Thread: intersection point slightly off

by Lenggries
Replies
2
Views
1,341

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. Thread: Help with a Treeview problem (moving items to the end)

by Lenggries
Replies
9
Views
902

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. Thread: Techniques on oral/mental math

by Lenggries
Replies
2
Views
1,395

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. Thread: vb6 Form Interface. Help

by Lenggries
Replies
7
Views
771

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 354
Page 1 of 9 1

Featured