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
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.
Re: About a variable public in instance
Quote:
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
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
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
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...
Re: About a variable public in instance
Quote:
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