RightToLeft MessageBox !!

hi every body,,

How i can show MessageBox.Show(...)..in RightToLeft Layout.

i am making form in RightToLeft = true and RightToLeftLayout = true..so the form Converted to RightToLeft..But the MessageBox does not..Show RightToLeft..So how i can set it for RightToLeft ..

Can i do that..please help

Thanks..

Best Regards.




Answer this question

RightToLeft MessageBox !!

  • Stevo90274

    ohh thats simple

    MessageBox.Show("hi", "som box", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.RtlReading);

    this will do it!!

    in case you didnt notice there is a MessageBoxOptions.RtlReading param that makes it from right to left

    Cheers


  • Mathew84

    This is what i want to do it..

    Thanks for all who help me..

    Bassam Basamad.



  • anonymous5000

    When you display a message box with the MessageBoxButtons.YesNoCancel; button 1 is Yes, button 2 is No and button 3 is Cancel.
    No when you set the MessageBoxDefaultButton.Button1, the default button is the Yes button. When the user hits the [enter] button Yes will be pressed or when you set the MessageBoxDefaultButton.Button2, No will be pressed.


  • Pedro Pimentel Figueiredo

    As zapacil89 said, you can set the MessageBoxOptions.RtlReading flag to specifies that the message box text is displayed with right to left reading order.


    // Initializes the variables to pass to the MessageBox.Show method.
    string message = "You did not enter a server name. Cancel this operation ";
    string caption = "No Server Name Specified";
    MessageBoxButtons buttons = MessageBoxButtons.YesNo;
    DialogResult result;

    // Displays the MessageBox.
    result = MessageBox.Show(this, message, caption, buttons,
    MessageBoxIcon.Question, MessageBoxDefaultButton.Button1,
    MessageBoxOptions.Rtlreading);




  • smadhu

    PJ. van de Sande

    yup.. but i what i dont understnad in my code and your code is .. What is the default button


  • RightToLeft MessageBox !!