ercand
12-11-2007, 23:24
Salve a tutti :D .
Sto cercando di utilizzare questo benedetto DrawString ma ho un problema che non riesco a risolvere, questo è il codice per usare il metodo
string testo = "we";
Font font = new Font("Times New Roman", 8, FontStyle.Regular);
Brush brush = new SolidBrush(Color.White);
g.DrawString(testo, font, brush, 10.0f, 10.0f);
In questo modo solleva un'eccezione di tipo ArgumentException e il messaggio è {"Parameter is not valid."}
se invece provo a scrivere così
string testo = "we";
Font font = new Font("Times New Roman", 8, FontStyle.Regular);
Brush brush = new SolidBrush(Color.White);
g.DrawString("", font, brush, 10.0f, 10.0f);
cioè con una stringa senza testo non solleva eccezioni :rolleyes:, qualcuno ha qualche suggerimento?
Sto cercando di utilizzare questo benedetto DrawString ma ho un problema che non riesco a risolvere, questo è il codice per usare il metodo
string testo = "we";
Font font = new Font("Times New Roman", 8, FontStyle.Regular);
Brush brush = new SolidBrush(Color.White);
g.DrawString(testo, font, brush, 10.0f, 10.0f);
In questo modo solleva un'eccezione di tipo ArgumentException e il messaggio è {"Parameter is not valid."}
se invece provo a scrivere così
string testo = "we";
Font font = new Font("Times New Roman", 8, FontStyle.Regular);
Brush brush = new SolidBrush(Color.White);
g.DrawString("", font, brush, 10.0f, 10.0f);
cioè con una stringa senza testo non solleva eccezioni :rolleyes:, qualcuno ha qualche suggerimento?