Click here to Skip to main content
15,914,071 members
Home / Discussions / C#
   

C#

 
Questioncrystal reports Pin
monuSaini28-Jul-07 0:20
monuSaini28-Jul-07 0:20 
AnswerRe: crystal reports Pin
Rupesh Kumar Swami28-Jul-07 1:44
Rupesh Kumar Swami28-Jul-07 1:44 
AnswerRe: crystal reports Pin
prasanna muthuramalingam28-Jul-07 3:22
prasanna muthuramalingam28-Jul-07 3:22 
GeneralRe: crystal reports Pin
monuSaini29-Jul-07 20:48
monuSaini29-Jul-07 20:48 
QuestionXML Root tag Pin
M. J. Jaya Chitra27-Jul-07 23:13
M. J. Jaya Chitra27-Jul-07 23:13 
Questiondelete a control containing label and textbox while assigning text at runtime Pin
trulyyy27-Jul-07 22:57
trulyyy27-Jul-07 22:57 
AnswerRe: delete a control containing label and textbox while assigning text at runtime Pin
Martin#30-Jul-07 10:38
Martin#30-Jul-07 10:38 
Questioni have design a controle using following code Pin
cuteAisha27-Jul-07 22:56
cuteAisha27-Jul-07 22:56 
i have design a controle using following code

private void NO_Paint(object sender, PaintEventArgs e)

{

Graphics g = e.Graphics;

Point[] points = { new Point(0, 42), new Point(15, 42), new Point(15, 25), new Point(15, 63) };

Point[] points2={ new Point(30, 25), new Point(30, 63), new Point(30, 42), new Point(47, 42) };

g.DrawLines(Pens.Black, points);

g.DrawLines(Pens.Black, points2);

g.Dispose();

}

private void lblNO_Click(object sender, EventArgs e)

{

lblNO.Visible = false;

txtNO.Visible = true;

}

private void txtNO_KeyPress(object sender, KeyPressEventArgs e)

{

if (e.KeyChar == 13)

{

lblNO.Text = txtNO.Text;

txtNO.Visible = false;

lblNO.Visible = true;

}

}

private void NO_Click(object sender, EventArgs e)

{

this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;

}

when i placed it on form and then i want to delet it

i am using the following code for that purpose

private void button1_Click(object sender, EventArgs e)

{

NO un = new NO();

un.Location = new System.Drawing.Point(X, Y);

un.Refresh();

un.Size = new Size(100, 100);

Controls.Add(un);

un.Click += new EventHandler(un_Click);


X += 50;

}


void un_Click(object sender, EventArgs e)

{

c = (UserControl)sender;

c.KeyDown += new KeyEventHandler(c_KeyDown);

}

void c_KeyDown(object sender, KeyEventArgs e)

{

if (e.KeyCode == Keys.Delete)

{

this.Controls.Remove(c);

}

}

but when i dont touch the control and as it delete it

it would be deleted when i change the value of lable on control the above code is not working.

AnswerRe: i have design a controle using following code Pin
Guffa27-Jul-07 23:12
Guffa27-Jul-07 23:12 
GeneralRe: i have design a controle using following code Pin
cuteAisha28-Jul-07 1:39
cuteAisha28-Jul-07 1:39 
AnswerRe: i have design a controle using following code Pin
Luc Pattyn28-Jul-07 2:04
sitebuilderLuc Pattyn28-Jul-07 2:04 
Questionapplication connect to sql data base Pin
prasadbuddhika27-Jul-07 22:43
prasadbuddhika27-Jul-07 22:43 
AnswerRe: application connect to sql data base Pin
Colin Angus Mackay27-Jul-07 23:08
Colin Angus Mackay27-Jul-07 23:08 
QuestionRefreshing a Form Pin
sangramkp27-Jul-07 21:46
sangramkp27-Jul-07 21:46 
AnswerRe: Refreshing a Form Pin
ekynox27-Jul-07 21:49
ekynox27-Jul-07 21:49 
GeneralRe: Refreshing a Form Pin
sangramkp27-Jul-07 21:57
sangramkp27-Jul-07 21:57 
GeneralRe: Refreshing a Form Pin
ekynox27-Jul-07 23:17
ekynox27-Jul-07 23:17 
GeneralRe: Refreshing a Form Pin
sangramkp28-Jul-07 0:03
sangramkp28-Jul-07 0:03 
Questionhi friends Pin
Baljit Singh Grewal27-Jul-07 20:58
Baljit Singh Grewal27-Jul-07 20:58 
AnswerRe: hi friends Pin
Christian Graus27-Jul-07 21:31
protectorChristian Graus27-Jul-07 21:31 
AnswerRe: hi friends Pin
Guffa27-Jul-07 21:57
Guffa27-Jul-07 21:57 
Questionselect from DataBase Pin
Thaer Hamael27-Jul-07 18:10
Thaer Hamael27-Jul-07 18:10 
AnswerRe: select from DataBase Pin
Christian Graus27-Jul-07 18:24
protectorChristian Graus27-Jul-07 18:24 
AnswerRe: select from DataBase Pin
Paul Conrad27-Jul-07 19:44
professionalPaul Conrad27-Jul-07 19:44 
QuestionSelecte max(Feild)from Pin
Thaer Hamael27-Jul-07 17:58
Thaer Hamael27-Jul-07 17:58 

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.