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

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

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

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

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

        如何取消winform按鈕點(diǎn)擊事件?

        How to cancel winform button click event?(如何取消winform按鈕點(diǎn)擊事件?)
      1. <small id='bQKy4'></small><noframes id='bQKy4'>

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

                1. 本文介紹了如何取消winform按鈕點(diǎn)擊事件?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  我有一個(gè)繼承自 System.Windows.Forms.Button 的自定義按鈕類.

                  I have a custom button class inherited from System.Windows.Forms.Button.

                  我想在我的 winform 項(xiàng)目中使用這個(gè)按鈕.

                  I want to use this button in my winform project.

                  這個(gè)類叫做ConfirmButton",它用Yes或No顯示確認(rèn)信息.

                  This class is called "ConfirmButton", and it shows confirm message with Yes or No.

                  但問(wèn)題是當(dāng)用戶選擇否并確認(rèn)消息時(shí),我不知道如何停止點(diǎn)擊事件.

                  But the problem is that I do not know how to stop click event when user selected No with confirm message.

                  這是我的課程來(lái)源.

                  using System;
                  using System.ComponentModel;
                  using System.Windows.Forms;
                  
                  namespace ConfirmControlTest
                  {
                      public partial class ConfirmButton : System.Windows.Forms.Button
                      {
                          public Button()
                          {
                              InitializeComponent();
                  
                              this.Click  += Button_Click;
                          }
                  
                          void Button_Click(object sender, EventArgs e)
                          {
                              DialogResult res    = MessageBox.Show("Would you like to run the command?"
                                  , "Confirm"
                                  , MessageBoxButtons.YesNo
                                  );
                              if (res == System.Windows.Forms.DialogResult.No)
                              {
                                  // I have to cancel button click event here
                  
                              }
                          }
                      }
                  }
                  

                  如果用戶從確認(rèn)消息中選擇否,則按鈕單擊事件不應(yīng)再觸發(fā).

                  If user select No from confirm message, then the button click event should not fire anymore.

                  推薦答案

                  你需要重寫(xiě)點(diǎn)擊事件.

                  class ConfirmButton:Button
                      {
                      public ConfirmButton()
                      {
                  
                      }
                  
                      protected override void OnClick(EventArgs e)
                      {
                          DialogResult res = MessageBox.Show("Would you like to run the command?", "Confirm", MessageBoxButtons.YesNo
                              );
                          if (res == System.Windows.Forms.DialogResult.No)
                          {
                              return;
                          }
                          base.OnClick(e);
                      }
                  }
                  

                  這篇關(guān)于如何取消winform按鈕點(diǎn)擊事件?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  What are good algorithms for vehicle license plate detection?(車牌檢測(cè)有哪些好的算法?)
                  onClick event for Image in Unity(Unity中圖像的onClick事件)
                  Running Total C#(運(yùn)行總 C#)
                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時(shí)刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時(shí)突出顯示行)
                  Calling A Button OnClick from a function(從函數(shù)調(diào)用按鈕 OnClick)
                  <legend id='zn8tD'><style id='zn8tD'><dir id='zn8tD'><q id='zn8tD'></q></dir></style></legend>

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

                          <bdo id='zn8tD'></bdo><ul id='zn8tD'></ul>
                            <tbody id='zn8tD'></tbody>

                          1. <tfoot id='zn8tD'></tfoot>

                            <i id='zn8tD'><tr id='zn8tD'><dt id='zn8tD'><q id='zn8tD'><span id='zn8tD'><b id='zn8tD'><form id='zn8tD'><ins id='zn8tD'></ins><ul id='zn8tD'></ul><sub id='zn8tD'></sub></form><legend id='zn8tD'></legend><bdo id='zn8tD'><pre id='zn8tD'><center id='zn8tD'></center></pre></bdo></b><th id='zn8tD'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='zn8tD'><tfoot id='zn8tD'></tfoot><dl id='zn8tD'><fieldset id='zn8tD'></fieldset></dl></div>
                          2. 主站蜘蛛池模板: 91色视频在线观看 | 色资源在线观看 | 亚洲欧洲一区二区 | 一区二区三区在线看 | 日韩精品一 | 免费的av网站| 91成人在线视频 | 精品蜜桃一区二区三区 | 人人干免费 | 琪琪午夜伦伦电影福利片 | 国产成人jvid在线播放 | 欧美日产国产成人免费图片 | 国产成人精品一区二区三区 | 日本午夜一区 | 亚洲综合精品 | 亚洲二区视频 | 国产日韩欧美中文字幕 | 天天久久| 亚洲 欧美 日韩在线 | 亚洲精品电影在线观看 | 免费国产一区 | 国产精品久久久久久一区二区三区 | 午夜在线精品 | 亚洲人成在线播放 | 九九伦理片 | 日韩欧美精品一区 | 国产成人免费视频 | 亚洲欧美一区二区三区在线 | 午夜噜噜噜 | 亚洲免费在线观看av | 国产精品视频网站 | 欧美久久久久 | 天天综合久久 | 日日摸夜夜添夜夜添精品视频 | 羞羞视频网站免费看 | 五月香婷婷 | 欧美日韩一卡二卡 | 欧美国产日韩在线 | 日韩精品在线播放 | 一级做a爰片久久毛片 | 国产伦精品一区二区三区高清 |