473,397 Members | 1,949 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,397 software developers and data experts.

how to close all forms in vb

284 100+
is it possible to close all froms in visual basic project
except the form which we click to open

for example i we have a from newrecord when the user
click the menu newrecord only newreord form should be visible
and all other form if they are open are unloaded.
Dec 10 '07 #1
4 4894
debasisdas
8,127 Expert 4TB
You can hide all other forms except the desired form.
Dec 10 '07 #2
muddasirmunir
284 100+
my question is rather
if i open a form let say sales and entering sale then whil the sales form
is open i click on the form new record
now i want to automatically unload the sales form .
now then i click purchase form it will unload newrecord form
and so on

thus whenever ever i open any form it will unload the form which
is opened
i did not want to unload any form my typing name rather i want
to use somethig like this
insted of

Expand|Select|Wrap|Line Numbers
  1.  unload slaesfrm
or
Expand|Select|Wrap|Line Numbers
  1.  unload purchasefrm
i want to use

Expand|Select|Wrap|Line Numbers
  1.  unload "any form which is loaded"
hope you understand my question


You can hide all other forms except the desired form.
Dec 10 '07 #3
Ali Rizwan
925 512MB
Salam Muddassir Bhai

It can be doe but i don't think it all can be done by a single command.
Assign a number code to every form every time you opens new form like sales it checks the code and close that form.

You need to right these codes ones like unload sales or anyother form.
Write these in a module and then call at every form load event.

I think this will help you.
If you don't understand then tell me i ll demonstrate a sample.

And plz answer me here in thescripts not in yahoo for this post.
Waiting.

Allah Hafiz
>> Ali <<
Dec 10 '07 #4
muddasirmunir
284 100+
asalam o alikum
ali,
i will try this if i had any further query i will mail you
thanks


Salam Muddassir Bhai

It can be doe but i don't think it all can be done by a single command.
Assign a number code to every form every time you opens new form like sales it checks the code and close that form.

You need to right these codes ones like unload sales or anyother form.
Write these in a module and then call at every form load event.

I think this will help you.
If you don't understand then tell me i ll demonstrate a sample.

And plz answer me here in thescripts not in yahoo for this post.
Waiting.

Allah Hafiz
>> Ali <<
Dec 11 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jules Winfield | last post by:
My WinForms application can have any number of top level forms open at a given time. If the user selects File|Exit, all of the forms are closed. The loop to close the forms looks something like this:...
2
by: Guy Babbitt | last post by:
I have an MDI application that starts an instance of a child form at application start. I have an event handler on a combo box checking for the selected value to change. When the select value...
1
by: Ebrahim | last post by:
This message is in reply to a prev 1 . My application refues to close . Some one had suggested that I might have threads running.. but i solved that problem too . The app still refuses to close...
1
by: Alpha | last post by:
I have a Window based application that shows up still running in the task manager when I close it. It reaches the "this.close" statement and then it stops at the "}" at the section of the...
7
by: Alice | last post by:
Hi, In my program, the user can navigate to many different forms. When they go to the next form, I want the form they have left to close. However, the forms aren't closing. Can anyone tell me...
3
by: rdemyan via AccessMonster.com | last post by:
I need help with code to close two forms at the same time, FormA and FormB. I need code that can be used from either form and needs to work with both a 'Close' button on each form as well as if the...
3
by: Greg Strong | last post by:
Hello All, Is there any way to close an ODBC connection via DSN without completely closing the Access front-end? I'm doing some testing with using Access as a front-end to Oracle 10g Express...
8
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query...
10
by: morangolds | last post by:
Hi, I've been having a problem with C++ Windows Forms apps not "ending" when you close the form window. I've searched about this problem all over the place and most searches have lead me to...
8
by: Rodrigo Juarez | last post by:
Hi I'm using Visual Studio 2005 with visual basic, developing winforms applications I'm adding try catch blocks for error handling and I want to close the application when I got an error....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.