久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

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

      1. <legend id='btWoh'><style id='btWoh'><dir id='btWoh'><q id='btWoh'></q></dir></style></legend>
        <tfoot id='btWoh'></tfoot>

        來自另一個線程的 DoDragDrop()

        DoDragDrop() from another thread(來自另一個線程的 DoDragDrop())

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

            <tbody id='Pc35V'></tbody>
        1. <i id='Pc35V'><tr id='Pc35V'><dt id='Pc35V'><q id='Pc35V'><span id='Pc35V'><b id='Pc35V'><form id='Pc35V'><ins id='Pc35V'></ins><ul id='Pc35V'></ul><sub id='Pc35V'></sub></form><legend id='Pc35V'></legend><bdo id='Pc35V'><pre id='Pc35V'><center id='Pc35V'></center></pre></bdo></b><th id='Pc35V'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Pc35V'><tfoot id='Pc35V'></tfoot><dl id='Pc35V'><fieldset id='Pc35V'></fieldset></dl></div>

              • <bdo id='Pc35V'></bdo><ul id='Pc35V'></ul>

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

                • 本文介紹了來自另一個線程的 DoDragDrop()的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  每次我想讓用戶拖動控件時,我都會調用該控件的 DoDragDrop.

                  Every time i want let the user to drag an control, i calling DoDragDrop of that control.

                  拖拽&drop 工作正常,但我對周圍的事情有疑問:

                  The drag & drop works fine, but i have problem with things around:

                  1. DoDragDrop 完全阻塞了表單,沒有計時器事件跳轉,沒有處理任何繪制消息.

                  1. DoDragDrop completely blocking the form, no timer events jumps, no paint messages handled.

                  DoDragDrop 阻止不僅用于拖動 &drop 操作,但直到目標程序完成 drop 事件(即 explorer.exe 的吸代碼).依賴其他程序的代碼很爛.

                  DoDragDrop blocking not only for the drag & drop operation, but until target program finishing with the drop event (I.E. explorer.exe's suck code). Depending on other program's code is sucks.

                  我想從一個新線程調用 DoDragDrop.

                  I thought to call DoDragDrop from a new thread.

                  試過這個:

                  Thread dragThread = new Thread(() =>
                  {
                      Form frm = new Form();
                      frm.DoDragDrop("data", DragDropEffects.All);
                  });
                  
                  dragThread.SetApartmentState(ApartmentState.STA);
                  dragThread.IsBackground = true;
                  dragThread.Start();
                  

                  但它似乎不起作用.我的意思是:當像這樣從其他線程執行 DoDragDrop 時,我的程序或其他程序中的其他控件不會接收拖放消息.

                  but it doesn't seems to work. I mean: when doing DoDragDrop from other thread like this, other controls within my program or other programs does not receiving drag&drop messages.

                  還有其他解決方案嗎?

                  推薦答案

                  DoDragDrop 方法會停止處理事件,直到第一個鼠標事件(例如 mouse move).所以我找到的解決方法非常簡單——你只需要在調用 DoDragDrop 之前用相同的鼠標位置模擬鼠標事件:

                  The DoDragDrop method stops processing of events until first mouse event (for example mouse move). So the workaround I found is very simple - you just need to simulate mouse event with the same mouse position just before calling DoDragDrop:

                  
                  void XYZControl_MouseDown(object sender, MouseEventArgs e)
                  {
                      var senderControl = (Control) sender;
                      ...
                      Cursor.Position = senderControl.PointToScreen(new Point(e.X, e.Y));   // Workaround!
                      if (DoDragDrop(senderControl, DragDropEffects.Move) == DragDropEffects.Move)
                      {
                      ...
                      }
                  ....
                  }
                  

                  這篇關于來自另一個線程的 DoDragDrop()的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Ignore whitespace while reading XML(讀取 XML 時忽略空格)
                  XML to LINQ with Checking Null Elements(帶有檢查空元素的 XML 到 LINQ)
                  Reading XML with unclosed tags in C#(在 C# 中讀取帶有未閉合標簽的 XML)
                  Parsing tables, cells with Html agility in C#(在 C# 中使用 Html 敏捷性解析表格、單元格)
                  delete element from xml using LINQ(使用 LINQ 從 xml 中刪除元素)
                  Parse malformed XML(解析格式錯誤的 XML)

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

                  <legend id='HHWPm'><style id='HHWPm'><dir id='HHWPm'><q id='HHWPm'></q></dir></style></legend>

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

                        <i id='HHWPm'><tr id='HHWPm'><dt id='HHWPm'><q id='HHWPm'><span id='HHWPm'><b id='HHWPm'><form id='HHWPm'><ins id='HHWPm'></ins><ul id='HHWPm'></ul><sub id='HHWPm'></sub></form><legend id='HHWPm'></legend><bdo id='HHWPm'><pre id='HHWPm'><center id='HHWPm'></center></pre></bdo></b><th id='HHWPm'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='HHWPm'><tfoot id='HHWPm'></tfoot><dl id='HHWPm'><fieldset id='HHWPm'></fieldset></dl></div>
                          <tbody id='HHWPm'></tbody>
                            <tfoot id='HHWPm'></tfoot>
                            主站蜘蛛池模板: 黄色影视 | www.操| 激情五月激情综合网 | 日韩黄色网址 | 一区二区国产精品 | 亚洲永久免费视频 | 国产精品美女久久久 | 午夜视频在线看 | 国产永久免费视频 | 欧美激情第二页 | 韩国免费理论片 | 亚洲一区二区三区视频 | 在线观看黄色片 | 在线观看亚洲视频 | 色综合天天综合网国产成人网 | h在线视频| 久久九九99| 欧美国产日韩一区二区 | 亚洲www啪成人一区二区麻豆 | 伦一理一级一a一片 | 欧洲色综合 | 天天摸夜夜操 | 麻豆视频国产 | 一级中国毛片 | 在线观看www | 视频一区二区在线播放 | 亚洲视频在线一区 | 在线一区二区三区 | 黄色一极片| 亚洲国产精品久久久 | 欧美亚洲一区二区三区 | 福利片在线观看 | 超碰成人网 | 国产午夜在线观看 | 少妇一级淫片免费看 | 国产日韩欧美在线观看 | 午夜aaa| 午夜网站在线观看 | 中文字幕精品在线 | 免费黄色片视频 | 亚洲综合天堂 |