private void PMain1_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { System.Windows.Forms.Panel oTmp = ((System.Windows.Forms.Panel)sender); myCopyIcon = oTmp.BackgroundImage; myCopyID = Convert.ToByte(oTmp.Tag.ToString()); myIconIDInReal = TmpEnviro.IconsInPage[myCurrentPageID - 1][myCopyID]; oTmp.DoDragDrop(oTmp, DragDropEffects.Copy); } }