المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : opacity problem



C# Programming
04-01-2009, 08:01 PM
Hi All,

I am using C#. I have a empty Form. When i move mouse on the Form, i am displaying the x and y position of mouse using DrawString() method.

Graphics grx = e.Graphics;
string xy = "X: " + cursorPos.X.ToString() + "\nY: " + cursorPos.Y.ToString();
grx.DrawString(xy, font, brush, cursorPos.X, cursorPos.Y);

The above code snippet is in Paint event. Hence the x and y values move along with cursor.

My problem,
When i change the opacity of Form from 100% to 10%, the Form becomes transparent. Even x and y values (displayed using DrawString) becomes transparent (faint).
I want the x and y values to be displayed clearly even if Form is transparent. How can i achieve it?

Thanks in advance.