473,386 Members | 1,764 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.

How to programatically close a form which has a Font/Color Dialogopened

Hi,

I have a form (say FormB) on which i have opened a font dialog. There
are situations when i need to close FormB, from another form (say
FormA) in my application. i am calling FormB.Close(), but the form
doesn't close. The moment i close the Font Dialog, FormB gets closed.
(Also, I observe the same behavior when i open other forms using
ShowDialog from FormB)

I need to find a way so that FormB closes as soon as i call
FormB.Close();

Regards,
Ankit
Mar 21 '08 #1
3 1210
On Mar 21, 6:41 am, aagarw...@gmail.com wrote:
Hi,

I have a form (say FormB) on which i have opened a font dialog. There
are situations when i need to close FormB, from another form (say
FormA) in my application. i am calling FormB.Close(), but the form
doesn't close. The moment i close the Font Dialog, FormB gets closed.
(Also, I observe the same behavior when i open other forms using
ShowDialog from FormB)

I need to find a way so that FormB closes as soon as i call
FormB.Close();

Regards,
Ankit
I don't think this is possible. The only way it would work is if you
could somehow tell the modal dialog to close, and I'm not sure of a
way to get that.
Mar 21 '08 #2
On Mar 21, 6:41*am, aagarw...@gmail.com wrote:
Hi,

I have a form (say FormB) on which i have opened a font dialog. There
are situations when i need to close FormB, from another form (say
FormA) in my application. i am calling FormB.Close(), but the form
doesn't close. The moment i close the Font Dialog, FormB gets closed.
(Also, I observe the same behavior when i open other forms using
ShowDialog from FormB)

I need to find a way so that FormB closes as soon as i call
FormB.Close();

Regards,
Ankit
Hi,

if the dialog is modal, how are you gonna clse it from another form?
Not only that, but IMHO closing a form without the user consent (or as
a response to an user action) is rude, very rude
Mar 21 '08 #3
On Tue, 25 Mar 2008 04:05:43 -0700, <aa*******@gmail.comwrote:
I dont just want to close the FormB, but also the modal dialog/form
blocking it.
Then perhaps you could be more clear about what's giving you trouble.
Posting a concise-but-complete code sample would be a good starting
point. What about closing the two forms are you having a hard time
figuring out?

Pete
Mar 25 '08 #4

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

Similar topics

0
by: CoreyMas | last post by:
Hello Everyone, I have been successful in creating a template column programatically using the examples provided in VS 2003. However I have not been able to programatically set the width of a...
6
by: marcelf3 | last post by:
Hello.. This page opens a window with some information, but everytime the user changes a field in the parent window, the child window needs to be closed. These 2 functions were supposed to do the...
2
by: Lumpierbritches | last post by:
Thank you in advance for any and all assistance. It is greatly appreciated. I would like to know if there's a way to programatically close any open form that doesn't have focus? Michael
2
by: Dave Bootsma | last post by:
Is it possible to programatically save a certain image from a certain web page? I want to automatically get a specific graphic from a specific web page programatically so I can automate the...
6
by: Mythran | last post by:
I have 2 projects, a Web project and a Class Library project. In the class project, I have a class called Class1. Pseudo below: Class Class1 ... Public Static Sub Generate() If True '...
2
by: What-a-Tool | last post by:
Decided to try and do it this way just to see if I could. My form appears with a rectangular hole in the center the size of my label. can anyone tell me why, and if it can be made visible? ...
1
by: Dino Buljubasic | last post by:
Hi, I am using C# VS2005 and I am having a problem that I did not notice before in VS2003. I have created myUserControl that contains a Panel. The panel is loaded dynamically with a number...
9
by: Niron kag | last post by:
Hello ! With c# , I want to create a HTML file programatically . How can I do it ? Thank U !
0
by: =?Utf-8?B?TWFyazEyMw==?= | last post by:
I have two pieces of VB.NET code below: a) Sends an email b) Returns a programmatically created jpeg image to a webpage. How can I embed the programmatically created jpeg into an HTML...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.