Click here to Skip to main content
15,913,587 members
Home / Discussions / C#
   

C#

 
GeneralRe: seaching a web page Pin
mikey C16-May-04 12:39
mikey C16-May-04 12:39 
GeneralRe: seaching a web page Pin
eggie516-May-04 19:36
eggie516-May-04 19:36 
GeneralRe: seaching a web page Pin
mikey C17-May-04 1:32
mikey C17-May-04 1:32 
GeneralRe: seaching a web page Pin
eggie516-May-04 6:32
eggie516-May-04 6:32 
QuestionHow to do list view control? I really need it/ Pin
Member 110099615-May-04 5:52
Member 110099615-May-04 5:52 
AnswerRe: How to do list view control? I really need it/ Pin
Corinna John15-May-04 9:39
Corinna John15-May-04 9:39 
GeneralRe: How to do list view control? I really need it/ Pin
Heath Stewart16-May-04 12:08
protectorHeath Stewart16-May-04 12:08 
GeneralCustom TextBox Control Pin
dragos_inf15-May-04 4:10
dragos_inf15-May-04 4:10 
Hello,

I am trying to create a customisable - bordered TextBox control. I draw the border in the overrided method OnPaint, after I have previousely set the UserPaint style bit.

I don't understand why the setting of the UserPaint flag makes the text within the textbox change its font.

My example can be reduced to this :

public class testTextBox : TextBox
{
public testTextBox()
{
//
// TODO: Add constructor logic here
//
this.SetStyle(ControlStyles.UserPaint, true);
}

protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint (e);
SolidBrush sb = new SolidBrush(Color.Red);
Pen pen = new Pen(sb, 1);
e.Graphics.DrawRectangle(pen, 0, 0, 10,10);
sb.Dispose();
pen.Dispose();
}

}

I tried to do the drawing of the string myself, but the font kept changing back.

Can anyone help, please?
GeneralRe: Custom TextBox Control Pin
Aaron Eldreth15-May-04 9:50
Aaron Eldreth15-May-04 9:50 
Generalregd datagrid Pin
karteek15-May-04 1:01
karteek15-May-04 1:01 
GeneralRe: regd datagrid Pin
..Hubert..15-May-04 4:06
..Hubert..15-May-04 4:06 
GeneralRe: regd datagrid Pin
karteek15-May-04 4:24
karteek15-May-04 4:24 
GeneralRe: regd datagrid Pin
Heath Stewart16-May-04 12:10
protectorHeath Stewart16-May-04 12:10 
GeneralCan't create socket under windows service project Pin
kookai15-May-04 0:44
kookai15-May-04 0:44 
GeneralDesigner - Dataset - Not adding to form Pin
Member 78672014-May-04 23:46
Member 78672014-May-04 23:46 
GeneralPlease help me POP3 with attachment Pin
Anonymous14-May-04 17:17
Anonymous14-May-04 17:17 
GeneralRe: Please help me POP3 with attachment Pin
Heath Stewart16-May-04 12:24
protectorHeath Stewart16-May-04 12:24 
GeneralCheck if Windows Form is already loaded Pin
Alan Zhao14-May-04 16:21
Alan Zhao14-May-04 16:21 
GeneralRe: Check if Windows Form is already loaded Pin
..Hubert..15-May-04 0:49
..Hubert..15-May-04 0:49 
GeneralRe: Check if Windows Form is already loaded Pin
Dave Kreskowiak15-May-04 3:01
mveDave Kreskowiak15-May-04 3:01 
GeneralRe: Check if Windows Form is already loaded Pin
Alan Zhao15-May-04 6:07
Alan Zhao15-May-04 6:07 
GeneralRe: Check if Windows Form is already loaded Pin
Dave Kreskowiak15-May-04 9:15
mveDave Kreskowiak15-May-04 9:15 
GeneralRe: Check if Windows Form is already loaded Pin
Alan Zhao15-May-04 14:44
Alan Zhao15-May-04 14:44 
GeneralRe: Check if Windows Form is already loaded Pin
Dave Kreskowiak16-May-04 4:15
mveDave Kreskowiak16-May-04 4:15 
GeneralWSE Client recieveing attachment from service. Pin
Michael A. Barnhart14-May-04 16:09
Michael A. Barnhart14-May-04 16:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.