|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Windows forms applicationI 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 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 Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:OKjevYWJGHA.1388@TK2MSFTNGP11.phx.gbl... > 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 > > 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 Dunn" <dunn***@cox.net> wrote in message news:UljDf.2073$MJ.392@fed1read07...Show quoteHide quote > 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 > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message > news:OKjevYWJGHA.1388@TK2MSFTNGP11.phx.gbl... >> 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 >> >> > > 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 Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:OpQVaNXJGHA.3700@TK2MSFTNGP15.phx.gbl... > 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 > > 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. Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:OpQVaNXJGHA.3700@TK2MSFTNGP15.phx.gbl... > 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 > 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). "Michael Dunn" <dunn***@cox.net> wrote in message news:ivhDf.2056$MJ.290@fed1read07...Show quoteHide quote >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 > > Thanks CMM, that's what I needed to know. Hopefully somebody at MS is
reading your posts. cheers, mike Show quoteHide quote "CMM" <cmm@nospam.com> wrote in message news:en6kw7WJGHA.984@tk2msftngp13.phx.gbl... > 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). > > "Michael Dunn" <dunn***@cox.net> wrote in message > news:ivhDf.2056$MJ.290@fed1read07... > >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 > > > > > > CMM,
> At the very least I expected VS2005 to have a Tabbed Document Interface Did you already try MS Office Access? If you want everything MDI, than that > 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). > 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 "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message <snip>news:%23lTfpXXJGHA.3696@TK2MSFTNGP15.phx.gbl... > A tabbed interface is for me typical Delphi, why would that be in Net. It <snip>> 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. 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). 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"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message Plaintive. :-(news:eZCP7LYJGHA.1188@TK2MSFTNGP14.phx.gbl... >> Your post is somewhat ironic... > > And what is yours? "CMM" <cmm@nospam.com> wrote in message Have you looked at Application Blocks?news:en6kw7WJGHA.984@tk2msftngp13.phx.gbl... > 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. See my blog post: http://www.itwriting.com/blog/?postid=293 Tim "Tim Anderson" <timjand@nospam.nospam> wrote in message Looks promising (the Composite UI Block). But MS's application blocks are news:u81AkYXJGHA.1676@TK2MSFTNGP09.phx.gbl... > > Have you looked at Application Blocks? > > See my blog post: > http://www.itwriting.com/blog/?postid=293 > > Tim 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?
It's the little things
Threading questions Application health monitoring - how? change value of textbox in datagrid Class and property question VS2005 Exception Handling How to get cmdArgs in Windows Application (vs2005) ? Overpunch (EBCDIC) Conversion Function Just want to be sure about 2005 combobox items |
|||||||||||||||||||||||