问题描述
我已经用excel和pdf生成报告
所以我用了2 btn
excel和pdf
单击时,excel btn报告将在excel中生成
然后单击pdf生成的pdf btn报告
在某些情况下,单击生成的btn excel或btn pdf报告,但如果用户单击两次btn excel或两次btn pdf应用程序挂起,则需要花费更多时间
所以我想要的是
单击btn excel或btn pdf时,都将btn禁用,直到在excel中生成报告,或者在生成报告后单击pdf,然后都启用btn.
i have generate report in excel and pdf
so i used 2 btn
excel and pdf
on click excel btn reports generate in excel
and on click pdf btn report generated in pdf
in some case on click btn excel or btn pdf report generated but takes some more time in that time if user click twice btn excel or twice btn pdf application hangs
so what i want is
on click btn excel or btn pdf both btn disable till report generated in excel or in pdf after report generated then both btn enable .
推荐答案
excelBtn.Visible=false;
pdfBtn.Visible=false;
在两个按钮单击事件中都使用这两行.
Use these two lines in both of your button click events.
这篇关于禁用按钮,然后启用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!