0

i tried to change the font of all objects on my single form, windows forms application(c#):

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
PrivateFontCollection PrivateFontCollection = new PrivateFontCollection();
PrivateFontCollection.AddFontFile(GetFontFilename());
Application.Run(new MainForm(new Font(PrivateFontCollection.Families[0], 12)));

i was successful except that the title text of the form(MainForm.Text) does not get changed to my desired font. i've tried setting the Font property in the constructor and also setting the Font property after the construction of the MainForm with no success.

it might be worth noting that the font that i'm using is a right to left persian font.

how can i change the font of the Form.Text property to a custom font?

raven
  • 775
  • 6
  • 22
  • 1
    You want the font of only your one form title changed, not system-wide, right? I doubt it is possible.. (you could always cheat with an overlay) – TaW Jun 28 '15 at 13:24
  • i want my form title's font to change as well as everything else that has already changed – raven Jun 28 '15 at 14:10
  • See [here](http://stackoverflow.com/questions/23276375/how-to-change-window-form-title-font-size-and-font-family) or [here](http://stackoverflow.com/questions/9566443/how-to-change-title-bar-font-in-win-apps-by-c) or [here](https://social.msdn.microsoft.com/Forums/windows/en-us/485fb4c5-8430-4cb5-8a4d-ccd7892e403b/how-to-change-the-title-bar-appearance) – TaW Jun 28 '15 at 14:13
  • ok. thanks @TaW. what should we do about the duplicate? – raven Jun 28 '15 at 14:37
  • If enough (4) folks agree it will be closed. Or you could delete it. sometimes even a duplicate gets a great answer or is helpful because it is better tagged or visible than the original question; here I'd go for deletion. – TaW Jun 28 '15 at 14:40

0 Answers0