Home All Groups Group Topic Archive Search About
Author
26 Feb 2006 1:45 PM
guy
just discovered that the combination of visual inheritance and reflection can
eliminate most of the databinding i would normally do, providing the design
is right!

and its only taken me 4 years lol

--guy--

Author
26 Feb 2006 3:25 PM
Cor Ligthert [MVP]
Guy,

> just discovered that the combination of visual inheritance and reflection
> can
> eliminate most of the databinding i would normally do, providing the
> design
> is right!
>
> and its only taken me 4 years lol
>
And your program is probably performing with the same speed as a VB6
program.

Cor
Author
26 Feb 2006 7:50 PM
CMM
That's a little harsh, Cor. I can see how Databinding /w Reflection could
make VB much more RAD akin to MS Access and might remove a lot of the
tediousness with first time set up of forms. If Microsoft has tied the
TableAdaptor to the Dataset, they might as well go the whole 9 yards.

--
-C. Moya
www.cmoya.com
Show quoteHide quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message
news:%23nD1xiuOGHA.1216@TK2MSFTNGP14.phx.gbl...
> Guy,
>
>> just discovered that the combination of visual inheritance and reflection
>> can
>> eliminate most of the databinding i would normally do, providing the
>> design
>> is right!
>>
>> and its only taken me 4 years lol
>>
> And your program is probably performing with the same speed as a VB6
> program.
>
> Cor
>
Author
27 Feb 2006 4:48 PM
Ken Halter
"CMM" <cmm@nospam.com> wrote in message
news:uA27j3wOGHA.532@TK2MSFTNGP15.phx.gbl...
> That's a little harsh, Cor. I can see how Databinding /w Reflection could

Actually, I think it was a compliment.

Show quoteHide quote
> make VB much more RAD akin to MS Access and might remove a lot of the
> tediousness with first time set up of forms. If Microsoft has tied the
> TableAdaptor to the Dataset, they might as well go the whole 9 yards.
>
> --
> -C. Moya
> www.cmoya.com

--
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..
Author
26 Feb 2006 7:58 PM
In article <#nD1xiuOGHA.1***@TK2MSFTNGP14.phx.gbl>,
notmyfirstn***@planet.nl says...
Show quoteHide quote
> Guy,
>
> > just discovered that the combination of visual inheritance and reflection
> > can
> > eliminate most of the databinding i would normally do, providing the
> > design
> > is right!
> >
> > and its only taken me 4 years lol
> >
> And your program is probably performing with the same speed as a VB6
> program.
>
> Cor
>
>
>


I'm intrigued do you have an example you could share?
Author
27 Feb 2006 3:19 AM
guy
hi,
cant give you the code as its in a number of methods in a couple of classes
but:-
in the base form...
load event get a hashtable of all the controls you might want to bind to
add an event handler that binds to the leave event or similar (1 handler for
all the controls) that handler can then use reflection to update the
appropriate property in the business object.
declare a business object of base type
write a display method that uses reflection to display all the properies in
the business object, call this from the event raised in the business object
(below)
ensure that when you name controls in the form they correspond to property
names in the business class, with + txt, lbl or whatever

in the base business class...
raie an event when any property you are interested in changes value

thats pretty much it (written at 3am so i may have missed a few bits!)

drop me an email to guy.omitt***@hotmail.com and i will send you the code
when i have it fully tidied up

cheers

guy
Show quoteHide quote
"spamsux@spamsux.net" wrote:

> In article <#nD1xiuOGHA.1***@TK2MSFTNGP14.phx.gbl>,
> notmyfirstn***@planet.nl says...
> > Guy,
> >
> > > just discovered that the combination of visual inheritance and reflection
> > > can
> > > eliminate most of the databinding i would normally do, providing the
> > > design
> > > is right!
> > >
> > > and its only taken me 4 years lol
> > >
> > And your program is probably performing with the same speed as a VB6
> > program.
> >
> > Cor
> >
> >
> >
>
>
> I'm intrigued do you have an example you could share?
>
Author
27 Feb 2006 8:31 AM
Pieter
So you're not really using DataBinding, but just updating the appropriate
Property when a control changes?
And how does it work when one of the property's of your business object
changes, and the Form must be updated?

Pieter

Show quoteHide quote
"guy" <g**@discussions.microsoft.com> wrote in message
news:B7DA1FBA-D044-463A-A03F-6DCFF2D1B877@microsoft.com...
> hi,
> cant give you the code as its in a number of methods in a couple of
> classes
> but:-
> in the base form...
> load event get a hashtable of all the controls you might want to bind to
> add an event handler that binds to the leave event or similar (1 handler
> for
> all the controls) that handler can then use reflection to update the
> appropriate property in the business object.
> declare a business object of base type
> write a display method that uses reflection to display all the properies
> in
> the business object, call this from the event raised in the business
> object
> (below)
> ensure that when you name controls in the form they correspond to property
> names in the business class, with + txt, lbl or whatever
>
> in the base business class...
> raie an event when any property you are interested in changes value
>
> thats pretty much it (written at 3am so i may have missed a few bits!)
>
> drop me an email to guy.omitt***@hotmail.com and i will send you the code
> when i have it fully tidied up
>
> cheers
>
> guy
Author
28 Feb 2006 7:57 AM
guy
Hi Pieter,
no i am not using data binding (except for a few things) it is something i
wanted to move awaw from. If a property in my business object changes i use
an event to update the form.

--guy--

Show quoteHide quote
"Pieter" wrote:

> So you're not really using DataBinding, but just updating the appropriate
> Property when a control changes?
> And how does it work when one of the property's of your business object
> changes, and the Form must be updated?
>
> Pieter
>
> "guy" <g**@discussions.microsoft.com> wrote in message
> news:B7DA1FBA-D044-463A-A03F-6DCFF2D1B877@microsoft.com...
> > hi,
> > cant give you the code as its in a number of methods in a couple of
> > classes
> > but:-
> > in the base form...
> > load event get a hashtable of all the controls you might want to bind to
> > add an event handler that binds to the leave event or similar (1 handler
> > for
> > all the controls) that handler can then use reflection to update the
> > appropriate property in the business object.
> > declare a business object of base type
> > write a display method that uses reflection to display all the properies
> > in
> > the business object, call this from the event raised in the business
> > object
> > (below)
> > ensure that when you name controls in the form they correspond to property
> > names in the business class, with + txt, lbl or whatever
> >
> > in the base business class...
> > raie an event when any property you are interested in changes value
> >
> > thats pretty much it (written at 3am so i may have missed a few bits!)
> >
> > drop me an email to guy.omitt***@hotmail.com and i will send you the code
> > when i have it fully tidied up
> >
> > cheers
> >
> > guy
>
>
>