C
C#2y ago
dvnlx.dev

How do i convert a string to System.Drawing.Font

I'm trying to make a notes app
2 Replies
dvnlx.dev
dvnlx.devOP2y ago
private void fontButton_Click(object sender, EventArgs e)
{
fontDialog.ShowColor = true;

fontDialog.Font = textBox.Font;
fontDialog.Font = ERROR -> defaultFont;
fontDialog.Color = textBox.ForeColor;
if (fontDialog.ShowDialog() != DialogResult.Cancel)
{
textBox.Font = fontDialog.Font;
textBox.ForeColor = fontDialog.Color;
}
}
private void fontButton_Click(object sender, EventArgs e)
{
fontDialog.ShowColor = true;

fontDialog.Font = textBox.Font;
fontDialog.Font = ERROR -> defaultFont;
fontDialog.Color = textBox.ForeColor;
if (fontDialog.ShowDialog() != DialogResult.Cancel)
{
textBox.Font = fontDialog.Font;
textBox.ForeColor = fontDialog.Color;
}
}
here is the code for more context
Want results from more Discord servers?
Add your server