UserPaint problem with TextBox


S

Sujay Ghosh

Hi,

I am deriving my user control from TextBox .

As I want to do some drawing within the textbox , I am doing the following :-

1) SetStyle(ControlStyles.UserPaint , true );
2) Overriding OnPaint


The drawing stuff works fine in OnPaint .

The problem happens with the font ;
Though I have set the font property to "Arial", 12 pt .

the effect is not there when ==> SetStyle(ControlStyles.UserPaint , true );

I want to have the Arial font as well I need to do the drawing.

I tried with WM_PRINT , and PRF_CLIENT but it did not work .

Please let me know how to acheive the above .

Thanks in advance.

Sujay
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top