Hi Guys,
I'm having problems with cross theme compatibility in windows forms. If you don't set the font for a control on a windows form, it will use the system font with correct typeface and size. If you want to make the font bold, it hard codes in the rest of the system font values for the current theme you're programming with. For instance:
System::Windows::Forms::Label^ label1 = gcnew System::Windows::Forms::Label();
this->label1->AutoSize = true;
this->label1->Location = System::Drawing::Point(9, 12);
this->label1->Name = L"lblExample";
this->label1->Size = System::Drawing::Size(44, 13);
this->label1->TabIndex = 3;
this->label1->Text = L"Example Text";
If I then change the properties of this via the properties editor so that bold = true, it adds in this line:
this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
Is there a way of using the default font, but making it bold?
Further yet, is there a way of using the system font, but making the size 3 or 4 points larger?