Windows forms application

  • Thread starter Thread starter Michael Dunn
  • Start date Start date
M

Michael Dunn

I am new to VB.NET, have programmed in visual C++ for awhile. My question is
whether there is a similar document-view architecture in VB, ie data stored
in CDocument, viewed in CView, or is the form responsible for storing and
viewing data.

thanks,
Mike
 
Michael,

VB Net is OOP a form object is instanced from a form class, which has all
the members to show a form.

I hope this helps,

Cor
 
There is absolutely no type of "framework" in all of VS or .NET in general
that accomplishes this. You're totally on your own to create this sort of
stuff. The tools you have to create your own paradigm or framework are all
there. You just gotta do it all yourself.

At the very least I expected VS2005 to have a Tabbed Document Interface
framework that allowed you to create professional modern apps. As it stands
you either create a messy overlapping-windows dialog based app or an even
messier deprecated MDI app.... which is what most developers choose to do
despite the fact that this paradigm has been urged against in every single
UI guideline since 1995 (including Microsoft's).
 
Cor, thank you for responding to my post. I understand that vb.net is oop. I
guess my question should have been phrased differently.

Lets say I have a list of strings I retrieve from a database table and I
want to store those strings in an array and make the array available to
several forms within the application. Where would the array be located and
how would I make it available to all the forms.

thanks,
mike
 
Thanks CMM, that's what I needed to know. Hopefully somebody at MS is
reading your posts.

cheers,
mike
 
Add a global (Public) variable to a global module (Project|Add Module)...
"modules" are a sort of VB specific construct similar to a class with all
Shared/Static methods.

You can also use Sub Main in a VB module to duplicate the "Main" entry point
in C/C++ apps.

Module basGlobal

Public g_someVariable as Integer = 0

Public Sub Main()

End Sub

Public Sub SomeMethod()
'bla bla bla
End Sub

End Module
 
Michael,

Although the prevered way is to pass reference information between objects.
Are you able to set things shared (not real OOP however just modulair
programming). This is done in C++ as well by creating static members.

In VBNet it is nicely to describe.
You can create members that you share between all objects and you can create
static fields to a wich belongs only static to a method.

A shared member you can create as this
\\\
Public Class SomeVariables
Public Shared ReadOnly Property CorsName() as String
Get
return "Cor"
End Get
End Property
End Class
///

You get this back as
SomeVariables.CorsName

A static field inside a method is just
Static MyField as String

However all of this is not real OOP of course (although it is widely used in
all C versions), this information is added to the main(stack) as it was done
by the first programs ever made as well.

I hope this helps,

Cor
 
Thanks Cor, I appreciate the help. You and CMM have definitely made things
alot clearer for me.

Cheers,
mike
 
CMM,
At the very least I expected VS2005 to have a Tabbed Document Interface
framework that allowed you to create professional modern apps. As it
stands you either create a messy overlapping-windows dialog based app or
an even messier deprecated MDI app.... which is what most developers
choose to do despite the fact that this paradigm has been urged against in
every single UI guideline since 1995 (including Microsoft's).

Did you already try MS Office Access? If you want everything MDI, than that
is the tool that probably fullfils your needs, although that it has of
course its limits and has probably 10% of the possibilities of Net. However,
as that is 90% of your problems to solve a very good tool.

A tabbed interface is for me typical Delphi, why would that be in Net. It is
the way that I mostly see direct that the application is made with Delphi, I
really don't call those one form compressed applications forever
professional as you seems to do. They often lack in my opinion a lot because
the small possibility of showing information.

Beside that, you can with less than 10 clicks create a windows form data
access application in any programlanguage of version 2005. I have seen this
now thanks to a problem from Philip that I investigated, but will probably
never use that myself.

Just my idea

Cor
 
CMM said:
There is absolutely no type of "framework" in all of VS or .NET in general
that accomplishes this. You're totally on your own to create this sort of
stuff. The tools you have to create your own paradigm or framework are all
there. You just gotta do it all yourself.

Have you looked at Application Blocks?

See my blog post:
http://www.itwriting.com/blog/?postid=293

Tim
 
Just to add to Cor's post:
A class with all "Shared" (equivalent of Static in C++) Methods,Properties,
and Fields is almost the same thing as a "Module".... the only difference is
that you don't need to qualify modules when calling them... they are truly
"global."

When calling shared methods as Cor describes your code would look like this:
SomeClass.SomeSharedMethod()

When calling a method in a global Module the call looks like this
SomeGlobalMethod()
from anywhere in your code across all files.
 
A tabbed interface is for me typical Delphi, why would that be in Net. It
is the way that I mostly see direct that the application is made with
Delphi, I really don't call those one form compressed applications forever
professional as you seems to do. They often lack in my opinion a lot
because the small possibility of showing information.
<snip>

Your post is somewhat ironic... considering you use one of the best Tabbed
Document Interfaces I have ever seen (Visual Studio)... but you can only
created Multiple Document Interfaces (MDI) with it!!!!

And, yes, Access has been due for an interface overhaul for a LONG LONG
time. Access was originally intended to be a laymen's (non-programmer)
database application meant to be used mainly by normal human office workers.
It has never ever reached that status... but has instead become a sort of
no-frills development platform for programmers... and thus replaced a niche
originally intended for FoxPro.

And even Access is starting to move away from MDI by implementing the same
(ill-conceived) pseudo-SDI interface that Excel has (via the "Windows in
Taskbar" option).
 
Tim Anderson said:
Have you looked at Application Blocks?

See my blog post:
http://www.itwriting.com/blog/?postid=293

Tim

Looks promising (the Composite UI Block). But MS's application blocks are
way too hammer-like and messy.... like requiring you to derive all your
classes from a particular base class and stuff like that.... totally
marrying you to a particular (unsupported) framework.

In short.... all I really want is for MDI Parent Forms to have a simple
property... (like enumed as "Classic," "Tabbed."). How hard is that?
 
CMM,
Your post is somewhat ironic...

And what is yours?

I understand your frustration with CSS by the way. I hope soon to understand
how to create in an easy way (not to use) new thema's as well.

However got the idea you was throwing that in this thread as well.

:-)

Cor
 
Back
Top