Click here to Skip to main content
15,898,134 members
Home / Discussions / C#
   

C#

 
AnswerRe: TextBox border Pin
Nader Elshehabi26-Aug-06 22:27
Nader Elshehabi26-Aug-06 22:27 
GeneralRe: TextBox border Pin
mav.northwind27-Aug-06 6:10
mav.northwind27-Aug-06 6:10 
GeneralRe: TextBox border Pin
Nader Elshehabi27-Aug-06 7:38
Nader Elshehabi27-Aug-06 7:38 
GeneralRe: TextBox border Pin
mav.northwind27-Aug-06 21:29
mav.northwind27-Aug-06 21:29 
GeneralRe: TextBox border Pin
Nader Elshehabi28-Aug-06 1:02
Nader Elshehabi28-Aug-06 1:02 
GeneralRe: TextBox border Pin
mav.northwind28-Aug-06 3:07
mav.northwind28-Aug-06 3:07 
GeneralRe: TextBox border Pin
Nader Elshehabi28-Aug-06 5:10
Nader Elshehabi28-Aug-06 5:10 
AnswerRe: TextBox border Pin
Nader Elshehabi28-Aug-06 5:19
Nader Elshehabi28-Aug-06 5:19 
Hello

If you were following the conversation I as having with mav.. There will be a slight change in the code for the sake of optimization

private bool DrawBox = false;

private void textBox1_MouseEnter(object sender, EventArgs e)
{
    Drawbox = true;
}

private void textBox1_MouseLeave(object sender, EventArgs e)
{
    Drawbox = false;
}

//now draw the Box according to input focus

private void textBox1_Enter(object sender, EventArgs e)
{
    Drawbox = true;
}

private void textBox1_Leave(object sender, EventArgs e)
{
    Drawbox = false;
}

private void textBox1_Paint(object sender, EventArgs e)
{
    Graphics g = textBox1.CreateGraphics();
    if(DrawBox)    
        g.DrawRectangle(new Pen(Brushes.Red, 3), new Rectangle(0, 0, textBox1.Width - 5, textBox1.Height - 5));
    else
        g.DrawRectangle(new Pen(Brushes.White, 3), new Rectangle(0, 0, textBox1.Width - 5, textBox1.Height - 5));
    g.Dispose();
}


i hope that work mav.. Thanks!

RegardsRose | [Rose]

GeneralRe: TextBox border Pin
mav.northwind28-Aug-06 8:26
mav.northwind28-Aug-06 8:26 
Questionhow to add checkbox column in datagrid Pin
iramg26-Aug-06 7:35
iramg26-Aug-06 7:35 
AnswerRe: how to add checkbox column in datagrid Pin
Ed.Poore26-Aug-06 8:58
Ed.Poore26-Aug-06 8:58 
GeneralRe: how to add checkbox column in datagrid Pin
iramg26-Aug-06 9:16
iramg26-Aug-06 9:16 
GeneralRe: how to add checkbox column in datagrid Pin
Ed.Poore26-Aug-06 9:37
Ed.Poore26-Aug-06 9:37 
QuestionHTTPS Proxy Pin
WillemM26-Aug-06 7:09
WillemM26-Aug-06 7:09 
QuestionInvoking an event... Pin
Shy Agam26-Aug-06 6:56
Shy Agam26-Aug-06 6:56 
AnswerRe: Invoking an event... Pin
Ed.Poore26-Aug-06 9:37
Ed.Poore26-Aug-06 9:37 
GeneralRe: Invoking an event... Pin
Shy Agam26-Aug-06 12:34
Shy Agam26-Aug-06 12:34 
GeneralRe: Invoking an event... Pin
Ed.Poore27-Aug-06 8:21
Ed.Poore27-Aug-06 8:21 
AnswerRe: Invoking an event... Pin
Nader Elshehabi26-Aug-06 21:57
Nader Elshehabi26-Aug-06 21:57 
QuestionHow to check a DataGridViewCheckBoxCell? Pin
printscreen1234526-Aug-06 5:55
printscreen1234526-Aug-06 5:55 
AnswerRe: How to check a DataGridViewCheckBoxCell? Pin
Nader Elshehabi26-Aug-06 22:05
Nader Elshehabi26-Aug-06 22:05 
GeneralRe: How to check a DataGridViewCheckBoxCell? Pin
printscreen1234527-Aug-06 3:59
printscreen1234527-Aug-06 3:59 
AnswerRe: How to check a DataGridViewCheckBoxCell? Pin
Nader Elshehabi27-Aug-06 5:13
Nader Elshehabi27-Aug-06 5:13 
GeneralRe: How to check a DataGridViewCheckBoxCell? Pin
printscreen1234527-Aug-06 6:12
printscreen1234527-Aug-06 6:12 
GeneralRe: How to check a DataGridViewCheckBoxCell? Pin
Nader Elshehabi27-Aug-06 7:55
Nader Elshehabi27-Aug-06 7:55 

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.