473,804 Members | 4,128 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

No Forms Collection

Does anybody know why VB.NET would omit the Forms collection available in
previous versions versions of VB? I imagine that there must be a reason why
they decided to do away with it, but I can't fathom why. Does anybody know?
Nov 21 '05
15 1364
Larry Lard wrote:
I would of course welcome examples of where Forms is geniunely useful
:)


I used to use the Forms collection for quite a few things.

A couple of examples:

I'd use it to determine whether a form in my application was already being
used. If the user tried to open a second instance of the form then I would
just pop the existing form to the front instead of opening another instance.
That was useful.

I also used to have multiple forms open that provided different views into
an object the user was working with. When the user moved to a different
object, all of the open windows would automatically update to view the new
object instead. This was achieved by iterating through the Forms collection,
identifying forms that needed to be updated and calling a method on each to
look at the new object.

In VB.NET I can work around most of the missing functionality because I'm
writing an MDI application, so I can use the MdiChildren array. There are
occasions where I do miss it though.

--

(O)enone

Nov 21 '05 #11
"Larry Lard" <la*******@hotm ail.com> wrote in message
news:11******** *************@g 14g2000cwa.goog legroups.com...
OK maybe you could have a collection of all Form objects that are
currently referenced - but unless you used WeakReferences (which I only
found out about the other day), this would stop forms ever being GC'd.


If the Form object is being currently referenced then you wouldn't want it to
be GC'd.
Nov 21 '05 #12
Alex,

Are this enough articles to start with
http://groups-beta.google.com/group/...rch+this+group

Cor
Nov 21 '05 #13
Herfried,

The main difference is that VB6 provided a "standardiz ed" way to keep
track of form instances in the 'Forms' collection, which made exchanging
forms between projects much easier. In VB.NET, currently people have to
implement their own collection which leads to many different,
non-compatible solutions.


This discussion in this thread looks for me about religion, you tell that
everybody needs it. And I don't need it, in those situations it has no
sense to discuss, you believe it or not.

I was more interesting in a reply on the message where you wrote about that
byte collection. I took some time to make if visible what you wrote.

Cor
Nov 21 '05 #14
"Cor Ligthert" <no************ @planet.nl> wrote in message
news:eL******** *****@TK2MSFTNG P10.phx.gbl...
Are this enough articles to start with
http://groups-beta.google.com/group/...rch+this+group


Only if the articles go on to explain why MS decided to do away with it, which
is what my original question was (and still is).
Nov 21 '05 #15
Cor,

"Cor Ligthert" <no************ @planet.nl> schrieb:
The main difference is that VB6 provided a "standardiz ed" way to keep
track of form instances in the 'Forms' collection, which made exchanging
forms between projects much easier. In VB.NET, currently people have to
implement their own collection which leads to many different,
non-compatible solutions.


This discussion in this thread looks for me about religion, you tell that
everybody needs it. And I don't need it, in those situations it has no
sense to discuss, you believe it or not.


Huh? Where did I write that everybody needs a 'Forms' collection?! The
whole discussion is absolutely not about "religion".

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2145
by: Mark Hannon | last post by:
I am designing a PayPal shopping cart/store for a client and have placed several of PayPal's shopping cart forms on the page to correspond with different products. Each form has a unique name though each of the form's elements have to use PayPal's required naming conventions to pass the data to their server. Many of the forms have hard-coded data in them and these have not caused me any problems. The problems I am having are with 3 forms...
4
2420
by: Soryt | last post by:
Hi everyone ! 1) An example from help: "Each Form object has a Controls collection, which contains all controls on the form. You can refer to a control on a form either by implicitly or explicitly referring to the Controls collection. Your code will be faster if you refer to the Controls collection implicitly. The following examples show two of the ways you might refer to a control named NewData on the form called OrderForm:
4
1787
by: sparks | last post by:
OK we have it so we can use tables to define skip patterns on our forms. BUT we can only do one form. Public Function skipPattern(currentFrm As Form, Optional currentCtl As Control = Null) As Integer the current form. ouch. this works fine as long as the controls are all on one form.
6
9428
by: Edwinah63 | last post by:
Hi everyone, could someone give me some thoughts on the best way to manage mdi parent and child forms? in vb6 i could scroll through the forms collection and determine which forms were open/closed and their current state. now i can't. before i didn't have to declare numerous named instances each time i loaded or unloaded a form.
5
1444
by: Simon Verona | last post by:
I have an application with a menu system which creates a new thread when a menu item is selected - some of these other threads may open a form for user interaction. Before the menu system is closed, I want to check that no other forms are open - on any thread. Is there a way of checking for this easily? At the moment, I'm not keeping track of new threads that I create ie I create the new thread using code similar to as follows: ...
12
1975
by: Peter Van Wilrijk | last post by:
Hi, In VB6 I have the following code ... Dim frmLink As Form Set frmLink = Forms.Add(stringformname) frmLink.Show 'wait until all data has been loaded Do Until frmLink.Loaded = 21 DoEvent
2
1352
by: Yuk Tang | last post by:
I have created my own custom forms called baseform, inheriting normal form properties and such. Baseform is, as can be expected, the basis for the other forms in my project. I want to close all forms whenever the x is clicked on any of those forms, so I go to the closing event and cycle through the forms collection, closing each of them down like so. either Forms(n).Close
18
2344
by: Jerry Boone | last post by:
I'm looking for a way to fire a public sub/function when a form is opened and closed - without using form level events. I have already done some extensive form work with instancing, looping through the forms collection, bringing forms to the front with API via hWnd, et.. and so on. The problem is that users are loosing windows behind others and I thought I would put a list together on an existing left handed menu of (i.e.) "My open...
21
10655
by: MLH | last post by:
Am having trouble with the following snippet. It stops after only cycling thru open forms. There are many more than that. How to modify this to cycle thru all forms? Sub AllOpenForms() Dim frm As Form ' Enumerate Forms collection. For Each frm In Forms
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10320
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7620
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5521
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.