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

Modal form dialog

Hi there,

I want to create a Modal dialog from.
Normally in vb it won't allow to click the parent form.

But I tried that in C# using form.ShowDialog(this);
I still can click on the mainForm event close the main form.

Does anyone know the trick of this?

Cheers,
Kids
Nov 16 '05 #1
4 1927
Can you send your code snippet please? Because I dont have any problem in
using ShowDialog.
Sree

"kids_pro" <ki******@yahoo.com> wrote in message
news:uP**************@tk2msftngp13.phx.gbl...
Hi there,

I want to create a Modal dialog from.
Normally in vb it won't allow to click the parent form.

But I tried that in C# using form.ShowDialog(this);
I still can click on the mainForm event close the main form.

Does anyone know the trick of this?

Cheers,
Kids

Nov 16 '05 #2
kids_pro wrote:
Hi there,

I want to create a Modal dialog from.
Normally in vb it won't allow to click the parent form.

But I tried that in C# using form.ShowDialog(this);
I still can click on the mainForm event close the main form.

Does anyone know the trick of this?

Sorry,

cannot reproduce this. Are you sure?

private void button1_Click(object sender, System.EventArgs e)
{
Form2 f = new Form2();
f.ShowDialog(this);
}

Cheers

Arne Janning
Nov 16 '05 #3
Oh I know what happen.
Because I put long running procedure in the Modal form.

in MainForm:
Form2 frm = new Form2();
frm.ShowDialog(this);

in Form2_Load(..,..){
this.Visible = true;
// long running part it take about 1 minute or more
// during this period I can click on the parent form and event close it.
// try it out you will see.
this.Close();
}


"Sreekanth" <sr*******@yahoo.com> wrote in message
news:ce**********@news.mch.sbs.de...
Can you send your code snippet please? Because I dont have any problem in
using ShowDialog.
Sree

"kids_pro" <ki******@yahoo.com> wrote in message
news:uP**************@tk2msftngp13.phx.gbl...
Hi there,

I want to create a Modal dialog from.
Normally in vb it won't allow to click the parent form.

But I tried that in C# using form.ShowDialog(this);
I still can click on the mainForm event close the main form.

Does anyone know the trick of this?

Cheers,
Kids


Nov 16 '05 #4
// Oop the actual part to cuz this behavior is Application.Doevents();

this.Visible = true;

for(int i =0; i<20000;i++){

for(int j=0;j<10000;j++){}

Application.DoEvents();

this.Text = i.ToString();

}

}

"Sreekanth" <sr*******@yahoo.com> wrote in message
news:ce**********@news.mch.sbs.de...
Can you send your code snippet please? Because I dont have any problem in
using ShowDialog.
Sree

"kids_pro" <ki******@yahoo.com> wrote in message
news:uP**************@tk2msftngp13.phx.gbl...
Hi there,

I want to create a Modal dialog from.
Normally in vb it won't allow to click the parent form.

But I tried that in C# using form.ShowDialog(this);
I still can click on the mainForm event close the main form.

Does anyone know the trick of this?

Cheers,
Kids


Nov 16 '05 #5

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

Similar topics

2
by: martin de vroom | last post by:
Hi, I have a web page that opens a modal dialog (client side) in the following manner onclick="window.showModalDialog('/dialog.asp',null,'dialogHeight: 200px; dialogWidth: 400px; dialogTop:...
2
by: cassidyc | last post by:
Hi, I was wondering if anyone has come accross this issue? And if they have any solutions I have that can create new copies of itself Form1 as = new form1(); af.show(); This form can also...
10
by: Guadala Harry | last post by:
I have a modal dialog that currently does all of the following except item 4. 1. lets users select a graphic from a list of thumbnails (and when selected, displays the full-size image in a...
11
by: VK | last post by:
In the continuation of the discussion at "Making Site Opaque -- This Strategy Feasible?" and my comment at http://groups.google.com/group/comp.lang.javascript/msg/b515a4408680e8e2 I have...
2
by: diogenes | last post by:
I have created many shortcut/popup (aka context, or right-click) menus for my application - instead of toolbars or standard drop-down menus. Within my custom menu, I am using...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
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
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: 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...

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.