Hi there. I'm rather new to the VB environment so don't know all the little tips and tricks that experienced programmers pick up, but I still want to make the most efficient code I possibly can. I already have general programming knowledge, but wish to gain VB-specific knowledge in addition.

If any of you have any advice for simple things I can do to increase performance, I would be very grateful if you'd share!

I'm looking for advice somewhat like "Unless absolutely required, don't declare things as Variant," and "Use option explicit", and "When evaluating a value of a control many times in a row, set a variable to that value instead of forcing VB to resolve the path every time it's referenced", just little things that help it compile and run cleaner.


A few specific questions:
I've heard that the Long type is the "native data type" in VB6, and that you can create minor overhead using Integers because of the time spent converting Integers to Longs, is this true?

When referencing methods in other modules, is it better practice to give the full path, or does the whole project compile together so that it doesn't matter? (IE "call someMethod" versus "call someModule.someMethod"

Should I list function and method prototypes at the top, similar to a C header file?

Which loop types compile better and more efficient in VB, and under what circumstances?

Which built-in library functions should I avoid, (if any) and why? Are there any cases where the provided function or method isn't good quality, and I would be better writing my own?

Anyway, VB is a very different environment than what I am used to. It is much more "helpful" and does much more behind the scenes than what I have experienced before, and I don't quite know what the side effects of this are.
Thanks in advance!