whats the difference between a sub and a function
and for what do i need the property set/get/let ?
i never used the property-thing.
Printable View
whats the difference between a sub and a function
and for what do i need the property set/get/let ?
i never used the property-thing.
A Function returns a value whereas a Sub does not.
You can use a Property for setting values, for example, if you were making a Timer you can create a Property for it's Interval.
?
if i want to change the interval, i type timer1.interval = 100 in a sub or function.
i am NOT a professional vb programmer. i teached myself qbasic and then i changed to vb 6
cant you send me a detailed description?
Functions and subs are much the same as in qbasic, except you don't use declare statement. VB6 is object oriented so you'll probably start with the form object, or a module with a sub called main, you choose it from project properties. If you use a standard module, with the sub main, it will load first and terminate when all forms are unloaded. But when you start with a form, it will load up and execute the events, the subs that will fire on certain circumstances, for instance when you click on the form or unload it. These events can be used as normal subs and functions.
For instance the timer control will have a timer event that will fire on a specified interval, you can specify it in designtime in the properties window and in runtime using it's interval property as you yourself mentioned.