473,480 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to simulate MessageBox behavior?

I want to simulate the behavior of the messagebox;
I show the messagebox, and when it finished it return to where I called the
"MessageBox.Show()"

Form A:
showFormB(){
Show form B

// when form b is finished
// i want it to return here
}

I want form A and form B to be on the same thread, running serially rather
than running parrallel to each other

thanks,

Du
Nov 16 '05 #1
2 1920
Just derive your form B from System.Windows.Forms.Form class and call
ShowDialog()

In your form A

frmB bForm = new frmB()
frmB.ShowDialog()
'things to do after showing form B

Hope that helps

Quoc Khanh

"Du Dang" <vi*******@hotmail.com> wrote in message
news:WY********************@twister01.bloor.is.net .cable.rogers.com...
I want to simulate the behavior of the messagebox;
I show the messagebox, and when it finished it return to where I called the "MessageBox.Show()"

Form A:
showFormB(){
Show form B

// when form b is finished
// i want it to return here
}

I want form A and form B to be on the same thread, running serially rather
than running parrallel to each other

thanks,

Du

Nov 16 '05 #2
Nice!!!

It works like a charm. :-)
Thank you for your help!

Ca'm on Kha'nh nhieu nha (extra vietnamese gratitude)

Du
"Khanh Nguyen" <hu******@yahoo.com> wrote in message
news:#z**************@TK2MSFTNGP09.phx.gbl...
Just derive your form B from System.Windows.Forms.Form class and call
ShowDialog()

In your form A

frmB bForm = new frmB()
frmB.ShowDialog()
'things to do after showing form B

Hope that helps

Quoc Khanh

"Du Dang" <vi*******@hotmail.com> wrote in message
news:WY********************@twister01.bloor.is.net .cable.rogers.com...
I want to simulate the behavior of the messagebox;
I show the messagebox, and when it finished it return to where I called

the
"MessageBox.Show()"

Form A:
showFormB(){
Show form B

// when form b is finished
// i want it to return here
}

I want form A and form B to be on the same thread, running serially rather than running parrallel to each other

thanks,

Du


Nov 16 '05 #3

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

Similar topics

11
541
by: Rich Tasker | last post by:
I have a strange situation. A simple call to MessageBox.Show("XXX", "YYY") does not display the message in the messagebox with a visible font. Based on the content of the messagebox, the box...
1
1862
by: charliewest | last post by:
I am trying use server controls or web controls to simulate the following behavior. I've an image wrapped w/in a link to create a rollover effect as if both elements we're one graphic: <a...
61
16152
by: /* frank */ | last post by:
I have to do a homework: make a CPU simulator using C language. I have a set of asm instructions so I have to write a program that should: - load .asm file - view .asm file - do a step by step...
12
1430
by: Marc Jennings | last post by:
Hi, I have a problem with the message text and button text not showing up in a messagebox. (See attachment) The code I used to call this example was > MessageBox.Show(this,"Hello","nothing...
5
3172
by: Robert Heuvel | last post by:
Hi, this is what I did: public struct SWaitCursor:IDisposable { public SWaitCursor (int i) { Cursor.Current = Cursors.WaitCursor; } void System.IDisposable.Dispose() { Cursor.Current =...
3
1429
by: Dean Slindee | last post by:
Anyone know of a source project for inheriting from the current MessageBox or a new form that performs most or many of these design requirements: '1. handle 2-4 buttons as needed, including default...
3
2275
by: Ryan Liu | last post by:
Can someone give a sample to prevent a row from being deleted in a datatable? I tried e.Row.RejectChanges(); in dt_RowDeleting() but seems does not work. I need verify if there other data...
2
2812
by: cpptutor2000 | last post by:
Could some C guru suggest some possible solution to my problem? I am trying to simulate a clock and I have tried using 'gettimeofday' and some related C library functions, but I am not getting what...
1
1112
by: zimdanen | last post by:
This is a variant on what I posted earlier, but I think this is the most likely way to solve the problem, so here's my question (you can delete the old one): When a MessageBox pops up, it...
0
7048
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
6911
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
7091
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...
1
6743
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
6966
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
5344
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,...
0
2999
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
564
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.