|
-
Oct 5th, 2008, 05:59 AM
#1
Thread Starter
PowerPoster
About a variable public in instance
i'm using visual basic 6, in uC section....
i have a groupproject with a control.
in a module i build a type variable and a variable public:
Code:
Type Objects
ObjectsNumber As Long
ObjectName As String
ObjectSelected As Boolean
End Type
Public lstObjectsNames() As Objects
why these variable isn't only public in instance(i think that is the right term), but in intire object?
for example: i have 2 sprites in a form, when i my property page(these variable isn't a property, but is in a property page) i can see(in both objects, the same value)...
why these?
can i put these variable in a property?
thanks
-
Oct 7th, 2008, 07:08 AM
#2
Junior Member
Re: About a variable public in instance
Hi,
Could you make it more clear? with example or some thing. I have not understood the question really speaking.
-
Oct 10th, 2008, 01:59 PM
#3
Thread Starter
PowerPoster
Re: About a variable public in instance
 Originally Posted by mbshinde78
Hi,
Could you make it more clear? with example or some thing. I have not understood the question really speaking.
hi...
i'm sorry, but i'm portuguese....
control is a group of instances(various controls with same type), right?
my problem is: i have created that variable(because i don't know how put it in a property) why that varible have the same value in every instances?
thanks
-
Oct 12th, 2008, 05:40 PM
#4
Thread Starter
PowerPoster
Re: About a variable public in instance
can i create a public variable in UC(but in a module)?
(but these variable must be private in instance)
thanks
-
Oct 16th, 2008, 02:51 PM
#5
Thread Starter
PowerPoster
Re: About a variable public in instance
if i want create an public variable in UC(but in module), what adivices can anyone give me?
the best way is a class?
thanks
-
Oct 19th, 2008, 08:54 AM
#6
Re: About a variable public in instance
You can just put the values in the Initialize event of your class so per instantiation they would have the same default values...
-
Oct 19th, 2008, 09:28 AM
#7
Thread Starter
PowerPoster
Re: About a variable public in instance
 Originally Posted by dee-u
You can just put the values in the Initialize event of your class so per instantiation they would have the same default values...
thanks... but for my UC(for don't use class's) i will use a property/method....
anotherthing: i try use(without sucess) option private module in a module, but what these line do(i don't have sure if the line is right write, but i think that you understand what i mean)?
thanks
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
|