以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 请教代码 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=92883) |
-- 作者:hbhb -- 发布时间:2016/11/15 16:45:00 -- 请教代码 大师:像这种按钮事件控制,标准写法应该怎么写?如果不通过yes/no ,通过return返回的形式该怎么写? static a As Integer If a = 0 Then If MessageBox.Show("第一通过","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Information) = DialogResult.Yes Then a = a + 1 Else a = 0 End If End If If a = 1 Then If MessageBox.Show("第二通过","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Information) = DialogResult.Yes Then a = a + 1 Else a = 1 End If End If If a = 2 Then If MessageBox.Show("第三通过","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Information) = DialogResult.Yes Then a = a + 1 Else a = 2 End If End If If a = 3 Then If MessageBox.Show("第四通过","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Information) = DialogResult.Yes Then a = a + 1 Else a = 3 End If End If |
-- 作者:有点蓝 -- 发布时间:2016/11/15 17:03:00 -- 如果要弹出提示让用户选择,也就这样子了 |
-- 作者:hbhb -- 发布时间:2016/11/15 17:26:00 -- 如果不让用户选择,只有一个提示,怎么改动? |
-- 作者:狐狸爸爸 -- 发布时间:2016/11/15 17:27:00 -- 我服了。 ![]() |
-- 作者:有点蓝 -- 发布时间:2016/11/15 17:39:00 -- 有选择就会有分支,没有选择,那走哪个分支呢? 还不如就一句a=3就结束了,不明白你要做什么
|
-- 作者:hbhb -- 发布时间:2016/11/15 18:17:00 -- 让狐爸见笑了,我就服你呀。问您一个简单地问题?1+1 = ?我就不懂等于多少? |