PictureBox temp = new PictureBox(); temp.Location = new System.Drawing.Point(100, 90 + (20 * NumberOfButton)); temp.Name = "btn" + NumberOfButton; temp.Size = new System.Drawing.Size(((8 * tempWidth) / 100), ((10 * tempHeight) / 100)); temp.Text = ButtonText; temp.Tag = ButtonText; temp.Click += new EventHandler(OnButtonClick); String sql = "select Button_id, Button_logo from Button_mst where Button_id=" + NumberOfButton + ""; DataTable dtLogo = new DataTable(); _connector.FillTable(ref dtLogo, sql); byte[] data = (byte[])dtLogo.Rows[0][1]; MemoryStream strm = new MemoryStream(); strm.Write(data, 0, data.Length); strm.Position = 0; System.Drawing.Image img = System.Drawing.Image.FromStream(strm); temp.Image = img; flpButton.Controls.Add(temp);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)