Cascading list boxes

  • Thread starter Thread starter Tim Ferguson
  • Start date Start date
T

Tim Ferguson

Okay: I know this may not seem like much to you, but I have at last
worked out how to connect two database-linked listboxes using ADO dotNet.
You know: the first one has countries, and when you click one of them,
the second one shows cities in that country.

I have long experience in VB for ver 2 up to 5, then I've been in VBA
under Excel, Access, Word etc since. Therefore the dotNet framework is
all a bit strange, and the Express edition is very lean on documentation.
It took me a long time reverse-engineering all the automagic-generated
code to find the appropriate objects and classes (quite often called the
same things, too, which is very confusing). That's why I am so proud of
this :-)

Still, the question is this. Is there anyway of reading or diagramming or
displaying the default classes and objects created automatically by the
IDE?

Thanks in advance.

Tim F
 
Tim said:
Okay: I know this may not seem like much to you, but I have at last
worked out how to connect two database-linked listboxes using ADO dotNet.
You know: the first one has countries, and when you click one of them,
the second one shows cities in that country.

I have long experience in VB for ver 2 up to 5, then I've been in VBA
under Excel, Access, Word etc since. Therefore the dotNet framework is
all a bit strange, and the Express edition is very lean on documentation.
It took me a long time reverse-engineering all the automagic-generated
code to find the appropriate objects and classes (quite often called the
same things, too, which is very confusing). That's why I am so proud of
this :-)

Still, the question is this. Is there anyway of reading or diagramming or
displaying the default classes and objects created automatically by the
IDE?

Thanks in advance.

Tim F

You just want to see the code that the IDE puts in behind as it adds it
to the form? You need to turn on "Show hidden files" in your solution
explorer. Then a + will be next to your form. The class inside that +
will hold all the automatically generated code.

Chris
 
Tim,
(quite often called the same things, too, which is very confusing).
This is because of the little bit strange acting of VB6 with classes and the
new reintroducing faking of that in VBNet for that for the My classes. Which
makes in my opinion working with VB2005 less consistent and therefore more
difficult to understand as you show now.

However a class is a template, you cannot hold anything in it. Another name
for a class is a Type.

An object is something that you can make from a class and can use. (This is
not for a shared class, which is in fact a module, from which all members
are consequently in the program).

I hope this helps,

Cor
 
Chris said:
You just want to see the code that the IDE puts in behind as it adds
it to the form? You need to turn on "Show hidden files" in your
solution explorer. Then a + will be next to your form. The class
inside that + will hold all the automatically generated code.

I already found this: it's how I managed to get anything working at all.
I just read through pages and pages of auto-code and every now and then
found the object I wanted already instantiated and ready for use. Trouble
is, it takes ages.

What I was hoping for was a documentation function or window somewhere
that would show me all the auto-created classes and the ready-filled
objects so that I don't have to go find them one-by-one.

Or is this something you just do the first fifty times and then just
"know"?

Best wishes


Tim F
 
An object is something that you can make from a class and can use.
(This is not for a shared class, which is in fact a module, from which
all members are consequently in the program).

Thanks for this, although I understand the difference between classes and
objects. What I was referring to was that I could find classes like

ContactsAtALocationDataTable

which might or might not be instantiated into objects like

jesstab9DataSet.ContactsAtALocation

which is actually a class property. There are some mindnumbingly useful
class methods (but deeply hidden) like

ContactsDataTable.FindByCtNum

and some classes don't seem to have instances at all. It would be really
good if there were some kind of documentation or diagramming somewhere,
without having to read through the the .xsd and designer files line by
line. I get the feeling that ADO dot Net is very powerful, and that the
auto-written code could be phenomenonally useful, but it's still really
opaque.

Perhaps a 3rd-party tool?

Thanks and best wishes


Tim F
 
Back
Top