Message Box start position
-
hi all My Doubt might be a simple one .... how can we display the message Box in the center of the parent window?? i am passing 'this' in the arguments ... still its displayed in the center of the screen , not in the center of the parent window ... Can anybody suggest an idea?? Akhil
-
hi all My Doubt might be a simple one .... how can we display the message Box in the center of the parent window?? i am passing 'this' in the arguments ... still its displayed in the center of the screen , not in the center of the parent window ... Can anybody suggest an idea?? Akhil
-
hi all My Doubt might be a simple one .... how can we display the message Box in the center of the parent window?? i am passing 'this' in the arguments ... still its displayed in the center of the screen , not in the center of the parent window ... Can anybody suggest an idea?? Akhil
Hy, My idea is this. Suppose you have a windows form named frmMain and the TextBox txtTest. At form load event place this code:
txtTest.Left = frmMain.ActiveForm.Width / 2 - txtTest.Width / 2; txtTest.Top = frmMain.ActiveForm.Height / 2 - txtTest.Height / 2;
Also at design time set the Anchors of txtTest to Right and Down. It should work.Do your best to be the best
-
Hy, My idea is this. Suppose you have a windows form named frmMain and the TextBox txtTest. At form load event place this code:
txtTest.Left = frmMain.ActiveForm.Width / 2 - txtTest.Width / 2; txtTest.Top = frmMain.ActiveForm.Height / 2 - txtTest.Height / 2;
Also at design time set the Anchors of txtTest to Right and Down. It should work.Do your best to be the best