Click here to Skip to main content
15,888,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have following code in my application.

C#
MessageBox.Show(txtBxName, "Name cannot be blank", "Input Data Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);


But the Message box does not show up next to the text box txtName. Why?

Jyoti Bhatnagar
Posted
Comments
[no name] 7-Oct-12 9:00am    
Because the position is controlled by the system.
Sandeep Mewara 7-Oct-12 9:01am    
And where does it appear?
Jyoti5 7-Oct-12 9:50am    
Msg bx appears outside the form. Jyoti

1 solution

You can't set the location, or size or most of the look and feel of the standard message box. But, you can show a customized messagebox like described in this article:
A Custom Message Box[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900