|
-
Sep 6th, 2000, 04:57 PM
#1
Thread Starter
Addicted Member
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.
-
Sep 6th, 2000, 05:04 PM
#2
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.
-
Sep 7th, 2000, 02:20 AM
#3
Thread Starter
Addicted Member
?
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?
-
Sep 7th, 2000, 04:43 AM
#4
transcendental analytic
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.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|