Click here to Skip to main content
15,880,891 members
Home / Discussions / C#
   

C#

 
QuestionVehicle Lane Tracking Algorithm Pin
sebogawa30-May-09 9:44
sebogawa30-May-09 9:44 
AnswerRe: Vehicle Lane Tracking Algorithm Pin
Uffe Rask30-May-09 10:52
Uffe Rask30-May-09 10:52 
AnswerRe: Vehicle Lane Tracking Algorithm Pin
Henry Minute30-May-09 11:01
Henry Minute30-May-09 11:01 
QuestionRe: Vehicle Lane Tracking Algorithm Pin
sebogawa30-May-09 11:11
sebogawa30-May-09 11:11 
AnswerRe: Vehicle Lane Tracking Algorithm Pin
Henry Minute30-May-09 11:28
Henry Minute30-May-09 11:28 
GeneralRe: Vehicle Lane Tracking Algorithm Pin
sebogawa30-May-09 11:33
sebogawa30-May-09 11:33 
GeneralRe: Vehicle Lane Tracking Algorithm Pin
Henry Minute30-May-09 11:53
Henry Minute30-May-09 11:53 
QuestionAdding an event to a dynamically created Button Pin
Douglas Kirk30-May-09 8:08
Douglas Kirk30-May-09 8:08 
Hello I am trying to add an event to a button that I created dynamically, but I can not get the event to trigger.

I also want to reference the button in an array of buttons, but I have been unsuccessfull.

Any Ideas? Thank you in advance.


private void btnDouglasBrowse_Click(object sender, EventArgs e)
{
if (fbdDouglasMain.ShowDialog() == DialogResult.OK)
{
tbDouglasFolder.Text = fbdDouglasMain.SelectedPath;
btnDouglasBrowse.Enabled = false;
jtnDouglasMain.FolderName = tbDouglasFolder.Text;
for (int i = 0; i < 20; i++)
{
Button buttonName = new Button();
//buttonName.Location.X = i * 20;
buttonName.Location = new Point(i * 20 + 20,530);
buttonName.Width = 20;
buttonName.Text = i.ToString();
buttonName.DoubleClick += new EventHandler(buttonName_DoubleClick); // This line
this.Controls.Add(buttonName);
}

}

}

private void buttonName_DoubleClick(object sender, EventArgs e)
{
MessageBox.Show("The calculations are complete", "My Application",MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk);


}
AnswerRe: Adding an event to a dynamically created Button Pin
Luc Pattyn30-May-09 8:15
sitebuilderLuc Pattyn30-May-09 8:15 
QuestionSQL Server 2008 in C# Console Appications Pin
bigjoe11a30-May-09 4:09
bigjoe11a30-May-09 4:09 
AnswerRe: SQL Server 2008 in C# Console Appications Pin
Mbah Dhaim30-May-09 5:17
Mbah Dhaim30-May-09 5:17 
GeneralRe: SQL Server 2008 in C# Console Appications Pin
bigjoe11a30-May-09 5:35
bigjoe11a30-May-09 5:35 
AnswerRe: SQL Server 2008 in C# Console Appications Pin
Henry Minute30-May-09 7:48
Henry Minute30-May-09 7:48 
GeneralRe: SQL Server 2008 in C# Console Appications Pin
bigjoe11a30-May-09 8:17
bigjoe11a30-May-09 8:17 
GeneralRe: SQL Server 2008 in C# Console Appications Pin
bigjoe11a30-May-09 8:33
bigjoe11a30-May-09 8:33 
GeneralRe: SQL Server 2008 in C# Console Appications Pin
Henry Minute30-May-09 8:59
Henry Minute30-May-09 8:59 
GeneralRe: SQL Server 2008 in C# Console Appications Pin
bigjoe11a30-May-09 9:08
bigjoe11a30-May-09 9:08 
GeneralRe: SQL Server 2008 in C# Console Appications Pin
Henry Minute30-May-09 9:14
Henry Minute30-May-09 9:14 
GeneralRe: SQL Server 2008 in C# Console Appications Pin
Henry Minute30-May-09 9:22
Henry Minute30-May-09 9:22 
GeneralRe: SQL Server 2008 in C# Console Appications Pin
bigjoe11a30-May-09 9:59
bigjoe11a30-May-09 9:59 
GeneralRe: SQL Server 2008 in C# Console Appications Pin
Henry Minute30-May-09 10:43
Henry Minute30-May-09 10:43 
GeneralRe: SQL Server 2008 in C# Console Appications Pin
bigjoe11a30-May-09 11:31
bigjoe11a30-May-09 11:31 
GeneralRe: SQL Server 2008 in C# Console Appications Pin
Henry Minute30-May-09 11:52
Henry Minute30-May-09 11:52 
GeneralRe: SQL Server 2008 in C# Console Appications Pin
bigjoe11a30-May-09 12:03
bigjoe11a30-May-09 12:03 
QuestionUpdating changings back to DB from DataGridView Pin
WinSolution30-May-09 3:11
WinSolution30-May-09 3:11 

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.