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

C#

 
GeneralRe: Tab Control Pin
Eric Dahlvang8-Jan-07 5:11
Eric Dahlvang8-Jan-07 5:11 
GeneralRe: Tab Control Pin
Gal Edvi8-Jan-07 19:39
Gal Edvi8-Jan-07 19:39 
GeneralRe: Tab Control Pin
Eric Dahlvang9-Jan-07 3:22
Eric Dahlvang9-Jan-07 3:22 
QuestionGenerating a new button, from a button click? Pin
JayBoychuk8-Jan-07 3:58
JayBoychuk8-Jan-07 3:58 
AnswerRe: Generating a new button, from a button click? Pin
Mircea Puiu8-Jan-07 4:01
Mircea Puiu8-Jan-07 4:01 
GeneralRe: Generating a new button, from a button click? Pin
JayBoychuk8-Jan-07 5:50
JayBoychuk8-Jan-07 5:50 
GeneralRe: Generating a new button, from a button click? Pin
Mircea Puiu8-Jan-07 20:48
Mircea Puiu8-Jan-07 20:48 
GeneralA little bit more help Pin
Mircea Puiu8-Jan-07 21:38
Mircea Puiu8-Jan-07 21:38 
Suppose you have
private System.Windows.Forms.Button TheNewButton;

Somewhere, you want to have a piece of code creating a new button. Here the code you need:
this.SuspendLayout();
TheNewButton = new Button();
this.TheNewButton.TextAlign = ContentAlignment.MiddleCenter;
this.TheNewButton.Width = 140;
this.TheNewButton.Height = 40;
this.TheNewButton.Text = "New button";
this.TheNewButton.UseVisualStyleBackColor = true;
this.TheNewButton.Visible = true;
this.TheNewButton.Location = new System.Drawing.Point(150, 24);
this.Controls.Add(TheNewButton);
this.TheNewButton.Click += new System.EventHandler(this.TheNewButton_Click);
this.ResumeLayout();
this.Refresh();

Then do not forget to add the TheNewButton_Click() to your form class:
private void TheNewButton_Click(object sender, EventArgs e)
{
  // Do something here ...
}



SkyWalker

AnswerRe: Generating a new button, from a button click? Pin
Eric Dahlvang8-Jan-07 5:32
Eric Dahlvang8-Jan-07 5:32 
QuestionmyClass events Pin
Seishin#8-Jan-07 3:53
Seishin#8-Jan-07 3:53 
AnswerRe: myClass events Pin
Mircea Puiu8-Jan-07 3:55
Mircea Puiu8-Jan-07 3:55 
QuestionDatagrid cell double click Pin
Tyler458-Jan-07 3:37
Tyler458-Jan-07 3:37 
QuestionRe: Datagrid cell double click Pin
Tyler458-Jan-07 3:47
Tyler458-Jan-07 3:47 
AnswerRe: Datagrid cell double click Pin
Mircea Puiu8-Jan-07 3:51
Mircea Puiu8-Jan-07 3:51 
QuestionRe: Datagrid cell double click Pin
Tyler458-Jan-07 4:03
Tyler458-Jan-07 4:03 
AnswerRe: Datagrid cell double click Pin
Mircea Puiu8-Jan-07 21:44
Mircea Puiu8-Jan-07 21:44 
GeneralRe: Datagrid cell double click Pin
Tyler458-Jan-07 22:06
Tyler458-Jan-07 22:06 
QuestionHow do I bookmark code? Pin
mcgahanfl8-Jan-07 3:19
mcgahanfl8-Jan-07 3:19 
AnswerRe: How do I bookmark code? Pin
Mircea Puiu8-Jan-07 3:26
Mircea Puiu8-Jan-07 3:26 
GeneralRe: How do I bookmark code? Pin
mcgahanfl8-Jan-07 5:31
mcgahanfl8-Jan-07 5:31 
AnswerRe: How do I bookmark code? Pin
Pete O'Hanlon8-Jan-07 3:38
mvePete O'Hanlon8-Jan-07 3:38 
QuestionC# Timers Pin
manustone8-Jan-07 3:13
manustone8-Jan-07 3:13 
AnswerRe: C# Timers Pin
Mircea Puiu8-Jan-07 3:33
Mircea Puiu8-Jan-07 3:33 
GeneralRe: C# Timers Pin
manustone8-Jan-07 4:10
manustone8-Jan-07 4:10 
QuestionRuning stored procedure with oracle and C# Pin
sdsdsds@hotmail.com8-Jan-07 2:52
sdsdsds@hotmail.com8-Jan-07 2:52 

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.