473,406 Members | 2,312 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,406 software developers and data experts.

C#-FORM: Using MessageBoxes with an MDI.

I am trying to use NUnit for testing, at the insistence of a coworker. In order to test the code, I are using an MDI (also at the insistence of that coworker) so that I can get to the forms that I create. I am having difficultly because I use MessageBoxes to let the user know certain things, but I do not know how to get to them to have them automatically clicked using NUnit.

So my question is, how can I use MessageBoxes with an MDI? Or do I need to create my own MessageBox class and use that?

Also, it is necessary that the MessageBoxes (as they do normally) disallow the user from doing anything else while they are popped up on the screen (which I am unsure of how to do if I create my own MessageBox class).

Thanks,

zimdanen
Feb 12 '08 #1
1 1604
Shashi Sadasivan
1,435 Expert 1GB
If you only need to show a string in the message box, then you should stick to using the MessageBox class provided with the framework.

DialogResult result = MessageBox.Show("I am a string");

you can use the other overloaded metods of the MessageBox.Show method.

If you want to change behavious according to what the user clicked int he mewssagebox, that will be provoded by DialogResult "result"
Feb 13 '08 #2

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

Similar topics

8
by: Dennis C. Drumm | last post by:
I have ordered the book .NET Framework Solutions, In Search of the Lost Win32 API by John Paul Meuller which I think will help answer some of my questions I have regarding making custom...
3
by: Tony | last post by:
How do I get the browser to display a message box using C# in ASP.NET? Something similar to Javascripts Alert( ) type messagebox...
2
by: Claire | last post by:
I need my communication status window to be topmost when it's open/active. Ive set the TopMost property of the form to true and it does work ok. After performing tasks this window generates an...
0
by: luna | last post by:
need a basic message box - that when an exit button is pressed it checks the state of a variable if its true then it exits - if its false then a message pops up saying you havent saved - are you...
4
by: Carlos | last post by:
Hi all, I am new to asp in general, and I would like to know if it is good practice just to display a messagebox after a form validation is performed and the user must be warned about missing...
1
by: alan | last post by:
I've use VB.NET+Access to write build a simple POS application. For example i got two computer, comp A and comp B. Which comp A share a Access db file through the network. When open a new bill, the...
5
by: Bob | last post by:
My app shows a modal MDI parent form, and creates a timer that ticks every ten minutes to boot unresposive users at 3 in the morning. Below is a simplified working example with no time check. My...
5
by: raylopez99 | last post by:
I have a form, Form6, that has a bunch of buttons overlaid on it. I want to be able to click on any arbitrary area of the form, and if that area of the form is overlaid by a button, I want to...
14
by: raylopez99 | last post by:
KeyDown won't work KeyPress fails KeyDown not seen inspired by a poster here:http://tinyurl.com/62d97l I found some interesting stuff, which I reproduce below for newbies like me. The main...
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?
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
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.