A
active
The first is impacting my work the second is a "be nice if I could do it"
I have UserControls that have parameters that should be only set at run
time. Because the control needs to be supplied with information not
available at design time, that must be there before the parameters are set.
VB6 had Usermode which I guess could be used for that, but searching VB.NET
for usermode give no hits. I expected that it would show up as a change, at
least.
Anyway, is there a way in VB.NET to make a property runtime only? The best
I can come up with is to use a Sub instead of a Set but that kind of a
kludge. Or I could trap the error that occurs in the Set when the Designer
generated code runs.
Another way of stating the problem: Is there anyway I can keep the Designer
from generating code to initialize the property?
Best of all though: If the property didn't show up at all in the Designer
(so the Designer would not add code setting it) but a work around would be
if the code in the Set could be jumped over by something like a check on
UserMode.
Secondly, Seems I read that with .NET a ByRef could but marked as [out] if
the routine never changes the value. That is, it would still work if it were
ByVal but it's made ByRef for some reason like speed. Anyone know how to do
that. I can't find anything in the docs and don't know where (if for sure) I
read it.
Thanks
Cal
I have UserControls that have parameters that should be only set at run
time. Because the control needs to be supplied with information not
available at design time, that must be there before the parameters are set.
VB6 had Usermode which I guess could be used for that, but searching VB.NET
for usermode give no hits. I expected that it would show up as a change, at
least.
Anyway, is there a way in VB.NET to make a property runtime only? The best
I can come up with is to use a Sub instead of a Set but that kind of a
kludge. Or I could trap the error that occurs in the Set when the Designer
generated code runs.
Another way of stating the problem: Is there anyway I can keep the Designer
from generating code to initialize the property?
Best of all though: If the property didn't show up at all in the Designer
(so the Designer would not add code setting it) but a work around would be
if the code in the Set could be jumped over by something like a check on
UserMode.
Secondly, Seems I read that with .NET a ByRef could but marked as [out] if
the routine never changes the value. That is, it would still work if it were
ByVal but it's made ByRef for some reason like speed. Anyone know how to do
that. I can't find anything in the docs and don't know where (if for sure) I
read it.
Thanks
Cal