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

How to focus MessageBox

Hi,

I used MessageBox.Show to pop up some message, however, the message box
somethime is behind other forms, I'd like to know how to focus/activate the
message box?

Thanks in advance
Nov 21 '05 #1
3 9910
"Li Pang" <Li****@discussions.microsoft.com> wrote in message
news:DF**********************************@microsof t.com...
Hi,

I used MessageBox.Show to pop up some message, however, the message box
somethime is behind other forms, I'd like to know how to focus/activate
the
message box?


One of the overrides for MessageBox.Show has an owner argument, which is the
form the MessageBox will show in front of. Does that fix the problem?

Tim
IE share declining - does it make a difference?
http://www.itwriting.com/blog/?postid=106
Nov 21 '05 #2
Hi Tim Anderson,

Thanks. It does fix the problem.

"Tim Anderson" wrote:
"Li Pang" <Li****@discussions.microsoft.com> wrote in message
news:DF**********************************@microsof t.com...
Hi,

I used MessageBox.Show to pop up some message, however, the message box
somethime is behind other forms, I'd like to know how to focus/activate
the
message box?


One of the overrides for MessageBox.Show has an owner argument, which is the
form the MessageBox will show in front of. Does that fix the problem?

Tim
IE share declining - does it make a difference?
http://www.itwriting.com/blog/?postid=106

Nov 21 '05 #3
"Li Pang" <Li****@discussions.microsoft.com> schrieb:
I used MessageBox.Show to pop up some message, however, the message box
somethime is behind other forms, I'd like to know how to focus/activate
the
message box?


If you are using 'MsgBox', the messagebox will be shown in "application
modal" mode automatically.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4

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

Similar topics

1
by: Julie | last post by:
I am trying to set some checks on my tab pages. I have many sets of tab control pages with many controls on each page. I have got the code on the button to check each control to make sure it has an...
2
by: Geir Baardsen | last post by:
Hi! This is a problem I have: I have an Orderform and an OrderDetails form. I will have the user register a sparepartnr in the OrderDetails form, but only if that number doesn't exist already. If...
0
by: Vinod. | last post by:
Hi all, I have added browser control to a windows form. I am loading pages having multiple frames. I have noticed that the focus in a text is not maintained when the application is deactivated....
1
by: Keith Smith | last post by:
I have a form with some comboBoxes and other controls. When tabbing through the controls the cursor "disappears" about after the 4th comboBox. Apparently there is another item being focused,...
0
by: enahar | last post by:
I want to validate a cell wheather a value is greater than 0 or not.If value is greater than 0 then I want to show messagebox and focus back the same cell else move to the other cell. I am...
3
by: Vlado J. \(www.excelleinc.com\) | last post by:
Hi, I have a MDI parent form that opens form as MDIChildren. I'm trying to check if form is already opened and if it is to give it focus. I keep getting error messages and no matter what I try...
0
by: Tuomas | last post by:
import pygtk, gtk, gobject, ... class MyEntry(gtk.Entry): def __init__(self, is_OK): gtk.Entry.__init__(self) self.is_OK=is_OK self.add_events(gtk.gdk.FOCUS_CHANGE)...
1
by: Werner Schmidt | last post by:
Dear group, I have a very strange behaviour: In a loop there are several TextBoxes initialized: TextBox objTextBox = null; // one declaration for-loop // multiple initialisations
3
by: Miro | last post by:
VB 2005 Express. I have an MDI app, and I have a child form loading in the Parent form. On the Child form I have a command button "Close". Upon click of that close, If MessageBox.Show("Are...
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...
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...
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
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.