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

Opening one form from another

MJ
I have an application with 2 forms (formMain and formTools)
formMain contains a button which if clicked opens formTools using
..show(this)
This works fine as when open formTools is over FormMain and you can still
select both forms.
My problem is that I want o prevent the used opening the formTools form more
than once.
I cannot use a modal form as I still want to be able to use both forms when
they are open.

Thanks in advance.
MJ
Jun 28 '06 #1
1 2616
MJ,

Have a field storing the reference to formTools in formMain. When you
click the button, check the field. If the field is not null, then just do
nothing (or bring the form to the front).

If the field is null, then create a new instance of the form and store
it in the field. Also, add an event handler to the formTool's Closed event
to a method that will set the field to null when called.

Then just show the form.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"MJ" <no******@belmont.co.uk> wrote in message
news:12*************@corp.supernews.com...
I have an application with 2 forms (formMain and formTools)
formMain contains a button which if clicked opens formTools using
.show(this)
This works fine as when open formTools is over FormMain and you can still
select both forms.
My problem is that I want o prevent the used opening the formTools form
more than once.
I cannot use a modal form as I still want to be able to use both forms
when they are open.

Thanks in advance.
MJ

Jun 28 '06 #2

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

Similar topics

8
by: Matt | last post by:
I want to submit the form to the server without opening another page. When we do the following, it will submit the form data in myform to the IIS, and open page2.asp. <form name="myform"...
1
by: N. Graves | last post by:
Hi, I want to have a Search Dialog box that has several text box and fields to build a search and display the results in a form. I can do everything that I need to if I us a report but I would...
3
by: Greg | last post by:
On my report I want to have an opening balance signifying all transactions up to the month selected and detailed transactions for the month selected and then a closing blance. I'm perpelexed...
3
by: Rolan | last post by:
I need assistance regarding code needed to prevent someone from opening a form if a table field name(s) has been changed. For example, there is existing code to check for certain data based on...
3
by: yup | last post by:
I was wondering if you know a way to have, let's say, you would click on a menu bar item (where something like file, edit, format, help options are on Microsoft Word) and instead of opening a...
0
by: melanieab | last post by:
Hi, I can't begin to understand this one. I have a form with a tabcontrol. When I first enter one of the pages (whether by tabbing or opening the form), I say to focus on a button. It does focus...
2
by: Colin Halliday | last post by:
I have a Word 2003 mail merge main document (form letter) that is linked to another Word document data source for the mail merge. If I open this doc using the Word GUI, it first asks me to...
1
by: reidarT | last post by:
How can I open a form from another form with textfields containing data from the first form. Like openargs in Access reidarT
3
by: EManning | last post by:
I''m having problems getting a form to open while going from one tab to another. I have a tab control: one tab for counties and one tab for cities. Both tabs have multi-select listboxes. If...
1
by: Salad | last post by:
I have a form that opens another (intermediary) form. The user selects an option on the intermediary form and it opens another form and the intermediary form is closed. Ex: From MainForm...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.