That does not help. Let me try explaining my problem differently with an
example:
Private Function MyFunction(ByVal ctrl As Control) As String
dim copyofctrl as Control
'copyofctrl=ctrl this will be replaced with code that will assign a
copy of ctrl to copyofctrl that points to a new instance of whatever type
ctrl was
'my function code
End Function
In the part of my code labeled "my function code" I want to be able to do
ANYTHING I WANT to the local variable copyofctrl without having any effect
on ctrl. Hopefully this clears up what I am trying to do.
--
Nathan Sokalski
http://www.nathansokalski.com/
"tomb" <> wrote in message
news:RV5jg.71053$. ..
> Nathan Sokalski wrote:
>
>>I have a Control that I want to copy as a copy of the Control, not a copy
>>of the reference to the original. My reason for doing this is because some
>>of the methods I would calling would prevent proper rendering afterwards.
>>I access the Control as a parameter of a function, as follows:
>>
>>Private Function MyFunction(ByVal ctrl As Control) As String
>> 'code that will make a copy of ctrl
>> 'my function code
>>End Function
>>
>>(NOTE: I am using VB.NET and .NET Framework 1.1) Thanks.
>>
> You have to pass the ctrl ByRef in order to be working with the one you
> want to copy.
>
> T