vb.net在结束sub之前不显示控件 [英] vb.net not displaying controls before end sub

查看:121
本文介绍了vb.net在结束sub之前不显示控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我遇到问题。请帮帮我。

Hello
I am facing problem.Please Help me.

Private Sub btnView_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnJouView.Click
''code block1.....
''code  block1.....
''code block1.....
''code  block1.....
''code block1.....
''code  block1.....

groupbox.visible=true
combo.focus()
button.visible=true
''code block2 .....
''code block2 .....
''code block2.....
''code block2.....
''code block2.....
''code block2.....
end sub



当执行上面的代码时,执行子代码中的完整代码然后它会显示groupbox,combo,buttons屏幕。

我想要执行代码Block2等到按钮或组合触发他们的事件。

请给我一个出路。

谢谢


When above code is executed the full code within the sub is executed then it displays groupbox,combo,buttons on screen.
I want that execution of code Block2 waits until the button or combo fires their events.
please provide me a way out.
thanks

推荐答案

删除代码Block2,把它放在它自己的Sub中。从相应的ComboBox和Button事件中调用该Sub。
Remove the code Block2, put it in it''s own Sub. Call that Sub from the appropriate ComboBox and Button events.


这篇关于vb.net在结束sub之前不显示控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆