Click to See Complete Forum and Search --> : Real newbie questions...


TTN
October 14th, 1999, 05:22 PM
Hiya to all who reads this...
I'm kinda new to vb, an error happened when I
ordered vb5 so I ended up with a **** french
version. I don't understand much the helps, could anyone tell me presisely what DIM and DECLARE are for?, also if you could what are modules for? what's the difference between a class and a normal module? thanks

BrewGuru99
October 15th, 1999, 04:14 AM
Wow, the title says it all. I recommend you find a book to help you learn what you're doing.

This may be off of the general flow of this board, but do you mind if I ask why you are learning VB? The reason I ask is that I've seen many people try and learn VB because it's an "easy" language or as some sort of half-hearted attempt at becoming a programmer, only to end up writing poor quality code because they never took the time to really understand the basic structure of programming. You seem to be one of those people.

Make sure you want to be a programmer before you try to be one.

Crazy D @ Work
October 15th, 1999, 04:22 AM
Why not send it back and get the english version instead? Helpfiles are quite handy and if you can't read them since they're french, they must be a pain in your ....

Crazy D @ Work :-)

Reid Robbins
October 15th, 1999, 08:26 AM
The DIM statement is used to reserve space for variables and/or objects, either intrinsic or of a previously user-defined category. Normally, for several versions of VB now, it is used only within a procedure to declare local, procedure-level variables. At the module level, typically, you would use the PUBLIC or PRIVATE words instead (PUBLIC replaces the former GLOBAL, which is still recognized). The difference is that Dim gives you the default scope (which is Private. If you use OPTION EXPLICIT (highly recommended), all variables MUST be declared before they can be used. An extra advantage is that after DIM, PUBLIC or PRIVATE has declared a variable for use, VB will always adjust the case of a variable's usage to match the declaration. So if you "Dim MyVariable As Integer", then later type in "myvariable" or even "mYvArIaBlE", VB will change all occurences to "MyVariable". Just a nice "perc", I think.
DECLARE is used to declare function calls in DLLs outside of VB itself. For example, to make a call into the Windows API, you must add a Declare statement (in a module, not a form) to tell the VB compiler the arguments and argument types and the name of the DLL which contains it.
Modules are used to contain procedures which can be called from any other module, to Declare (as in DECLARE) function calls and to declare global (i.e. "Public") variables. Any form can call into any module--provided a procedure in the module is declared Public. Since, I belive, VB 4.0, it is also possible to declare a procedure Public in a form and call that from anywhere as well, but this is not a technique you should use often.
Finally, a Class Module is a module which defines a class, or "object". One class module defines one object: its methods, properties, creation and destruction. For example, you may create a class (object) named "Customer". This object may have properties, "Name" and methods "MakeNew" or, perhaps, "SendStatement"--whatever your application dictates. All these methods and properties would be defined within the single class module.
I hope this helps.



Reid Allen Robbins
2205 E. Teton Blvd.
Green River, WY 82935

TTN
October 15th, 1999, 11:59 AM
Well, BrewGuru, I am SORRY that you find me dumb, but I'm pretty **** sure when you where my age you hadn't an idea about what the hell programming is about. YES, I am a newbie in Visual Basic but who the hell told you I didn't know any other languages? Thanks for the "encouragement".

BrewGuru99
October 16th, 1999, 02:30 AM
I believe I need to apologize. I should've done my homework and read your profile's hobby section. Then I would've known my statement to be way wrong.

Sorry about that. (Bad day at work - 5 extra hours with no compensation, and I simply thought you were one of those "Would you please do my homework so that I can pass this class and get a degree so that I can get a higher paying job?" People. I was wrong.)

I'ed be glad to help with any questions you got (I know I had them when I first started). I'll also refrain from thinking that about anyone else in the future.

BrewGuru99

Xemion
October 16th, 1999, 02:06 PM
Let's watch the language, k? Cussing has nothing to do with VB :-) Thanks!

Xemion