473,405 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Enable application framework

In a new WindowsForm project with default settings I wrote a loop:
For Each frm In My.Application.OpenForms

If frm.Name <"MDIMain" Then

frm.Close()

End If

Next

Everything was fine until I decided to use Sub Main as Startup object. In
order to have it in the list of startup objects I had to uncheck Enable
application framework. Since that I have My.Application.OpenForms
highlighted and IDE says 'OpenForms is not a member of
'CMS.My.MyApplication'

How can I have OpenForms collection in my project if I use Sub Main as
Startup object?

Thank you

vovan
Mar 30 '07 #1
3 7237
If you are using VS 2005 you can try looping through
MDIForm.MdiChildren, instead of application.openforms.

Regards,

Sachin Palewar
(Certified Scrum Master)

Palewar Techno Solutions
(Mobile Solutions for Your Business)
www.palewar.com

On Mar 30, 11:56 pm, "vovan" <some...@vovan.comwrote:
In a new WindowsForm project with default settings I wrote a loop:
For Each frm In My.Application.OpenForms

If frm.Name <"MDIMain" Then

frm.Close()

End If

Next

Everything was fine until I decided to use Sub Main as Startup object. In
order to have it in the list of startup objects I had to uncheck Enable
application framework. Since that I have My.Application.OpenForms
highlighted and IDE says 'OpenForms is not a member of
'CMS.My.MyApplication'

How can I have OpenForms collection in my project if I use Sub Main as
Startup object?

Thank you

vovan

Mar 30 '07 #2
I found the solution. It should be:
System.Windows.Forms.Application.OpenForms

vovan

"vovan" <so*****@vovan.comwrote in message
news:uk**************@TK2MSFTNGP04.phx.gbl...
In a new WindowsForm project with default settings I wrote a loop:
For Each frm In My.Application.OpenForms

If frm.Name <"MDIMain" Then

frm.Close()

End If

Next

Everything was fine until I decided to use Sub Main as Startup object. In
order to have it in the list of startup objects I had to uncheck Enable
application framework. Since that I have My.Application.OpenForms
highlighted and IDE says 'OpenForms is not a member of
'CMS.My.MyApplication'

How can I have OpenForms collection in my project if I use Sub Main as
Startup object?

Thank you

vovan


Mar 30 '07 #3
Thanks a lot for your good advice

vovan

"Sachin Palewar" <pa*****@gmail.comwrote in message
news:11*********************@b75g2000hsg.googlegro ups.com...
If you are using VS 2005 you can try looping through
MDIForm.MdiChildren, instead of application.openforms.

Regards,

Sachin Palewar
(Certified Scrum Master)

Palewar Techno Solutions
(Mobile Solutions for Your Business)
www.palewar.com

On Mar 30, 11:56 pm, "vovan" <some...@vovan.comwrote:
>In a new WindowsForm project with default settings I wrote a loop:
For Each frm In My.Application.OpenForms

If frm.Name <"MDIMain" Then

frm.Close()

End If

Next

Everything was fine until I decided to use Sub Main as Startup object. In
order to have it in the list of startup objects I had to uncheck Enable
application framework. Since that I have My.Application.OpenForms
highlighted and IDE says 'OpenForms is not a member of
'CMS.My.MyApplication'

How can I have OpenForms collection in my project if I use Sub Main as
Startup object?

Thank you

vovan


Mar 30 '07 #4

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

Similar topics

1
by: mike | last post by:
Hi there, I made an asp.net application using VS.net and package it up. The setup.exe first checks .NET framework, then check IIS before install the application. The problem is, when I test it,...
4
by: Sheldon Penner | last post by:
I have been working my way through an ASP.NET tutorial and I find that any code that attempts to update an Access table evokes the error: "Operation must use an updateable query." A search of...
4
by: | last post by:
I have a shared IIS server running ASP.NET 1.1, and using a vbscript to add sites. All sites get added and use 1.1. After I installed 2.0, now I have two versions. And in IIS I have a new tab for...
1
by: Rick King | last post by:
Hi, Can someone tell me how i can enable an ASP.NET website to use the .NET 1.1 framework? The server only has .NET 2.0 installed, which is what the website is running as now but i need it to...
5
by: Miro | last post by:
My form suddenly wouldnt compile. It had an error - main form must be specified. So i went to my Solution and went to properties. In the Application Tab I reset my opening form, but my "Enable...
2
Jensen01
by: Jensen01 | last post by:
I am currently using windows xp he sp2. I recently reloaded windows from disc. Updated .net 1,2,&3 . Im working with a program that uses .net framework 2 called FAVC. Its a dvd editing/menu-burning...
1
by: AYasser | last post by:
Hi All, I am a VB.Net 2003 user and now upgraded to 2005. I have a Win application with a module as a startup object. The module enables me to close and open simultaneous forms while the application...
2
by: woony | last post by:
Hello, I have to update an excisting program. This is programmed in vs2003. framework 1 Now I have to do some changes to this and using vs2005 now. Also framework 2. Being this an update I'd...
1
praclarush
by: praclarush | last post by:
I'm writing a VB app. in Visual Studio 2005 But when I open up the project properties, to Enable the Application Framework the check box is disabled Which means I can't use a splash screen or...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.