string MyConString = "server=192.168.1.100;User Id=root;Persist Security Info=True;database=cms"; MySqlConnection connection = new MySqlConnection(MyConString); MySqlCommand command = connection.CreateCommand(); MySqlDataReader Reader; command.CommandText = "select * from menu_details"; connection.Open(); Reader = command.ExecuteReader(); while (Reader.Read()) { string a = Convert.ToString(1); if (Reader[5].ToString() == a) { string j = @"D:\cms-image\"; string k = Reader[13].ToString(); tsm_File.DropDownItems.Add(Reader[1].ToString(), Image.FromFile(j + k), new EventHandler(newToolStripMenuItem_Click)); } } connection.Close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)