• <legend id='hAn0t'><style id='hAn0t'><dir id='hAn0t'><q id='hAn0t'></q></dir></style></legend><tfoot id='hAn0t'></tfoot>

  • <i id='hAn0t'><tr id='hAn0t'><dt id='hAn0t'><q id='hAn0t'><span id='hAn0t'><b id='hAn0t'><form id='hAn0t'><ins id='hAn0t'></ins><ul id='hAn0t'></ul><sub id='hAn0t'></sub></form><legend id='hAn0t'></legend><bdo id='hAn0t'><pre id='hAn0t'><center id='hAn0t'></center></pre></bdo></b><th id='hAn0t'></th></span></q></dt></tr></i><div id='hAn0t'><tfoot id='hAn0t'></tfoot><dl id='hAn0t'><fieldset id='hAn0t'></fieldset></dl></div>

      <small id='hAn0t'></small><noframes id='hAn0t'>

        <bdo id='hAn0t'></bdo><ul id='hAn0t'></ul>

        C# 将一个图片框拖放到另一个图片框

        时间:2023-08-25
            <tbody id='6WWVJ'></tbody>

          1. <small id='6WWVJ'></small><noframes id='6WWVJ'>

          2. <i id='6WWVJ'><tr id='6WWVJ'><dt id='6WWVJ'><q id='6WWVJ'><span id='6WWVJ'><b id='6WWVJ'><form id='6WWVJ'><ins id='6WWVJ'></ins><ul id='6WWVJ'></ul><sub id='6WWVJ'></sub></form><legend id='6WWVJ'></legend><bdo id='6WWVJ'><pre id='6WWVJ'><center id='6WWVJ'></center></pre></bdo></b><th id='6WWVJ'></th></span></q></dt></tr></i><div id='6WWVJ'><tfoot id='6WWVJ'></tfoot><dl id='6WWVJ'><fieldset id='6WWVJ'></fieldset></dl></div>
              <tfoot id='6WWVJ'></tfoot>

                  <bdo id='6WWVJ'></bdo><ul id='6WWVJ'></ul>

                  <legend id='6WWVJ'><style id='6WWVJ'><dir id='6WWVJ'><q id='6WWVJ'></q></dir></style></legend>
                • 本文介绍了C# 将一个图片框拖放到另一个图片框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在尝试将一个图片框拖放到另一个图片框中.请帮我!谢谢最好的问候

                  I'm trying to drag and drop one picture box into another picture box. please help me! thanks Best Regards

                  推荐答案

                  看这个 http://www.codeguru.com/Csharp/Csharp/cs_syntax/controls/article.php/c5865

                  更新:做个小把戏

                      bool holdsImage = false;
                      Control currentControl = null;
                      private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
                      {
                          holdsImage = true;           
                      }
                  
                      private void pictureBox2_MouseEnter(object sender, EventArgs e)
                      {
                          currentControl = pictureBox2;
                      }
                  
                      private void pictureBox2_MouseLeave(object sender, EventArgs e)
                      {
                          currentControl = null;
                      }
                  
                      private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
                      {
                          if (holdsImage && currentControl==pictureBox2)
                          {
                              pictureBox2.Image = pictureBox1.Image;
                              pictureBox1.Image = null;
                          }
                          holdsImage = false;
                          currentControl = null;
                      }
                  

                  问题是我无法在 PictureBox 中找到 AllowDrop 属性,否则 DoDragDrop()

                  Problem is that I am unable to find AllowDrop property in PictureBox else it will be easy to implement by DoDragDrop()

                  这篇关于C# 将一个图片框拖放到另一个图片框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Windows Phone 8.1 中 UIElement 的拖放延迟 下一篇:在 DataGridView 中拖放行

                  相关文章

                  最新文章

                • <tfoot id='2UoZZ'></tfoot>

                  <small id='2UoZZ'></small><noframes id='2UoZZ'>

                      <bdo id='2UoZZ'></bdo><ul id='2UoZZ'></ul>
                      <legend id='2UoZZ'><style id='2UoZZ'><dir id='2UoZZ'><q id='2UoZZ'></q></dir></style></legend>

                      <i id='2UoZZ'><tr id='2UoZZ'><dt id='2UoZZ'><q id='2UoZZ'><span id='2UoZZ'><b id='2UoZZ'><form id='2UoZZ'><ins id='2UoZZ'></ins><ul id='2UoZZ'></ul><sub id='2UoZZ'></sub></form><legend id='2UoZZ'></legend><bdo id='2UoZZ'><pre id='2UoZZ'><center id='2UoZZ'></center></pre></bdo></b><th id='2UoZZ'></th></span></q></dt></tr></i><div id='2UoZZ'><tfoot id='2UoZZ'></tfoot><dl id='2UoZZ'><fieldset id='2UoZZ'></fieldset></dl></div>