如何在隐藏状态下创建表单实例? [英] How to create a form instance at hidden state?

查看:54
本文介绍了如何在隐藏状态下创建表单实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


在我的VB.Net应用程序中,我创建了一个我的表单的新实例,如:


NewForm = new MyNewForm( )


但是有了这一行,这个新表格会自动显示出来。我希望它一开始就隐藏了

...

在这一行之后添加一行如:


NewForm.Hide()或NewForm.Visible = false


没有帮助。把这一行放到这个新表单'的加载事件中也没有帮助




Sub Form_Load()

Me.Hide()


结束子


我怎样才能做到这一点?


问候,


?zden

解决方案

嗨Ozden,


如果你没有得到更好的东西,你可以使用这个

(但是你必须把那个me.hide条件否则你会看到它

从来没有更多)

:-)

Cor


\\\

Private Sub Form2_Load (ByVal sender As Object,_

ByVal e As System.EventArgs)Handles MyBase.Load

Me.WindowState = FormWindowState.Minimized

End Sub $ />

Private Sub Form2_VisibleChanged(ByVal sender _

As Object,ByVal e As System.EventArgs)处理MyBase.VisibleChanged

我.Hide()

结束子

///


Cor
在我的VB.Net应用程序中,我创建了一个我的表单的新实例,如:

NewForm = new MyNewForm()

但是使用此行,将自动显示此新表单。我希望它在开始时隐藏起来......

在这一行之后添加一行如:

NewForm.Hide()或NewForm.Visible =错误

没有帮助。把这一行放到这个新形式'的加载事件中也没有帮助

Sub Form_Load()

Me.Hide()

End Sub

如何实现这一目标?

问候,



您好,


感谢您的建议我会留在口袋里......


此解决方案允许表格制作像

这样的闪光开始所以我可能会寻找更好的解决方案...


再次感谢...


?zden


" Cor" < no*@non.com>在消息中写道

新闻:呃************** @ tk2msftngp13.phx.gbl ...

嗨Ozden,

如果你没有得到更好的东西你可以使用这个
(但你必须把那个me.hide条件,否则你看到它
永远不会更多)
:-)


\\\
Private Sub Form2_Load(ByVal sender As Object,_
ByVal e As System.EventArgs)处理MyBase.Load
Me.WindowState = FormWindowState.Minimized
End Sub

私有Sub Form2_VisibleChanged(ByVal发件人_
As Object,ByVal e As System.EventArgs)处理MyBase.VisibleChanged
Me.Hide()
End Sub
///

Cor


在我的VB.Net应用程序中,我创建了一个我的表单的新实例如:

NewForm = new MyNewForm()

但是使用此行,将自动显示此新表单。我希望它在开始时隐藏
...

在此行之后添加一行如:

NewForm.Hide()或NewForm.Visible =错误

没有帮助。把这一行放到这个新形式'的加载事件中也没有帮助

Sub Form_Load()

Me.Hide()

End Sub

如何实现这一目标?

问候,




你好Ozden,


Flash,比我没想到的那样在负载中最小化了吗?


Cor


感谢您的建议我会把它放在口袋里......

这个解决方案确实可以让表格像flash一样
开头所以我可能会寻找更好的解决方案......



Hello,

In my VB.Net application I create a new instance of my form like :

NewForm = new MyNewForm()

But with this line, this new form is automatically shown. I want it to be
hidden at the start...

Adding a line after this line like :

NewForm.Hide() or NewForm.Visible = false

didn''t help. Putting this line to this new form''s load event didn''t help
either.

Sub Form_Load()

Me.Hide()

End Sub

How can I achieve this?

Regards,

?zden

解决方案

Hi Ozden,

If you not get something nicer you can use this
(But you have to put make that me.hide conditional otherwise you see it
never more)
:-)
Cor

\\\
Private Sub Form2_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Me.WindowState = FormWindowState.Minimized
End Sub

Private Sub Form2_VisibleChanged(ByVal sender _
As Object, ByVal e As System.EventArgs) Handles MyBase.VisibleChanged
Me.Hide()
End Sub
///

Cor


In my VB.Net application I create a new instance of my form like :

NewForm = new MyNewForm()

But with this line, this new form is automatically shown. I want it to be
hidden at the start...

Adding a line after this line like :

NewForm.Hide() or NewForm.Visible = false

didn''t help. Putting this line to this new form''s load event didn''t help
either.

Sub Form_Load()

Me.Hide()

End Sub

How can I achieve this?

Regards,



Hello,

Thanks for this advice I''ll keep in my pocket...

This solution does allow the form to make something like flash at the
beginning so I probably will be looking for a better solution...

Thanks again...

?zden

"Cor" <no*@non.com> wrote in message
news:er**************@tk2msftngp13.phx.gbl...

Hi Ozden,

If you not get something nicer you can use this
(But you have to put make that me.hide conditional otherwise you see it
never more)
:-)
Cor

\\\
Private Sub Form2_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Me.WindowState = FormWindowState.Minimized
End Sub

Private Sub Form2_VisibleChanged(ByVal sender _
As Object, ByVal e As System.EventArgs) Handles MyBase.VisibleChanged
Me.Hide()
End Sub
///

Cor


In my VB.Net application I create a new instance of my form like :

NewForm = new MyNewForm()

But with this line, this new form is automatically shown. I want it to be hidden at the start...

Adding a line after this line like :

NewForm.Hide() or NewForm.Visible = false

didn''t help. Putting this line to this new form''s load event didn''t help
either.

Sub Form_Load()

Me.Hide()

End Sub

How can I achieve this?

Regards,




Hi Ozden,

Flash, than you did not set that form minimized in the load I think?

Cor


Thanks for this advice I''ll keep in my pocket...

This solution does allow the form to make something like flash at the
beginning so I probably will be looking for a better solution...



这篇关于如何在隐藏状态下创建表单实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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