locked
Hi friends RRS feed

  • Question

  • I created an application. In that i used messge box to display informatin. My problem is while running application , i resize the application using maximize button, that time application allows me(users) to drag the message box outside of the application(but, Message box displaying in the proper area). I need solution of not to allow me(users) to drag the message box outside of the application.

     

    Thanks and regards

    Manikandan M


    Manikandan Murugeshan
    Wednesday, June 29, 2011 6:17 AM

Answers

  • Sorry?

     

    You want your message box to not be moved out of the application?

     

    Well, the best way I can think of is to replace the message box with a form, and make the parent form an MDI container.

     http://www.codeproject.com/KB/cs/mdiformstutorial.aspx - that should give you enough information.

     

     

     

    Alternatively, you could check if the message box's x and y coordinates are inside of the parent form's x and y coordinates. But I don't know (and I don't think it's possible) if you can get the coordinates of a message box.

     

    Wednesday, June 29, 2011 6:42 AM
  • You can't access to messagebox x,y corrdinates or change them, or check where it is without doing something wildly,

    use a custom control. thats the best solution.

     


    If this post answers your question, please click "Mark As Answer". If this post is helpful please click "Mark as Helpful".
    Wednesday, June 29, 2011 7:27 AM

All replies

  • Sorry?

     

    You want your message box to not be moved out of the application?

     

    Well, the best way I can think of is to replace the message box with a form, and make the parent form an MDI container.

     http://www.codeproject.com/KB/cs/mdiformstutorial.aspx - that should give you enough information.

     

     

     

    Alternatively, you could check if the message box's x and y coordinates are inside of the parent form's x and y coordinates. But I don't know (and I don't think it's possible) if you can get the coordinates of a message box.

     

    Wednesday, June 29, 2011 6:42 AM
  • Hi 2Dv3D,

    Right i want message box not to move out of application.

    As you said that replacing of  message box with form would entirely change the apperance of the application. Any how heartly thanks for your suggestion. If you find any best answer for this problem ple inform me...

    Thanks and regards,

    Manikandan M

     

     


    Manikandan Murugeshan
    Wednesday, June 29, 2011 7:22 AM
  • You can't access to messagebox x,y corrdinates or change them, or check where it is without doing something wildly,

    use a custom control. thats the best solution.

     


    If this post answers your question, please click "Mark As Answer". If this post is helpful please click "Mark as Helpful".
    Wednesday, June 29, 2011 7:27 AM
  • Hi Durna,

    Thanks for ur suggestion. Will try....

     

     

    Thanks and Regards

    Manikandan M


    Manikandan Murugeshan
    Wednesday, June 29, 2011 7:51 AM