本文介绍了如何在C#windows窗体中单击一次后禁用该按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
美好的一天请创建一个cbt应用程序,并有一个开始和一个提交按钮。每当点击开始按钮时,它将把用户带到考试区域,然后当点击提交按钮时,用户到达那里但我想要单击提交按钮后永久禁用的开始按钮我不希望同一个用户进行两次检查。学生仪表板是开始按钮的位置。
我尝试过:
public void submit_Click(object sender,EventArgs e)
{
StudentDashBoard db = new StudentDashBoard();
db.btnstart.Enabled = false;
解决方案
Good day Please i created a cbt application and have a start and a submit button.Whenever the start button is clicked it will take the user to the exam area then when the submit button is clicked the user get there result but i want the start button to be disabled permanently after the submit button has been clicked i dont want the same user to do the exam twice.Where Student dashboard is where the start button is.
What I have tried:
public void submit_Click(object sender, EventArgs e) { StudentDashBoard db = new StudentDashBoard(); db.btnstart.Enabled = false;
解决方案
这篇关于如何在C#windows窗体中单击一次后禁用该按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!