سلام
میدونم که این مورد قبا مطرح شده اماجستجو کردم چیزی پیدا نکردم:متفکر::اشتباه:
Right to Let کردن متن عنوان MessageBox چطوریه؟:لبخندساده:
Printable View
سلام
میدونم که این مورد قبا مطرح شده اماجستجو کردم چیزی پیدا نکردم:متفکر::اشتباه:
Right to Let کردن متن عنوان MessageBox چطوریه؟:لبخندساده:
توی سایت Codeproject آقای میرمصطفی این کار رو با استفاده از Hook Up انجام دادند و متن و راست به چپ و کلیه دکمه هارو هم فارسی کردند. خیلی عالیه.
اینهم لینکش
http://www.codeproject.com/KB/cs/Dia...ontroller.aspx
اگه توی خود متد show را هم یه سرچ میزدی یه چیزایی پیدا می کردی
اگه نخوای که متن دکمه ها هم فارسی بشه می تونی از این کد ها استفاده کنی
اگه بخوای فقط متن راست به چپ بشه از این کد
MessageBox.Show("فقط متن راست به چپ", "تست", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign);
و اگه می خوای همه چیز messageBox راست به چپ بشه از این کد
MessageBox.Show("خدا می دونه به طور کل همه چیز راست به چپ !!!", "تست", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign | MessageBoxOptions.RtlReading);
دو تا عکس هم Attach کردم
عکس first مال کد اول و عکس second مال کدم دوم
موفق باشید
یکی از فرق هاش اینه که متن خود دکمه ها را با خود متد Show ار کلاس MessageBox نمیشه فارسی کرد
فرق بعدیش هم فکر می کنم اینه که با hookUp می شه پنجره های دیگه ای مثل OpenFileDialog و ... را هم کنترل کرد و اونا را هم فارسی کرد
بقیه فرقاشون را نی دونم
اما در مورد MessageBox همونطور که گفتم اگه نیاز به فارسی کردم دکمه ها نباشه استفاده از متد Show به اون نحوی که گفتم ساده تر و کد نویسی خیلی کمتری نسبت به hookUp داره
بله کاملا درسته. با روش hook کردن، دست، یکم بازتره، شما میتونید هر بلایی که دلتون میخواد سر پنجره hookشده بیارید.