简体   繁体   English

.NET 2.0 / VS2005 - BringToFront()根本不起作用

[英].NET 2.0/VS2005 - BringToFront() simply does not work

BringToFront doesn't work. BringToFront不起作用。 after called, my form still stays under an file explorer window or any other window it's under. 在调用之后,我的表单仍然保留在文件浏览器窗口或其下的任何其他窗口下。 It's clearly visible. 它清晰可见。 It's otherwise fine, but it simply does not move to the foreground when this is called. 它在其他方面很好,但在调用它时它根本不会移动到前台。 not even if i do a "show" before, or after. 即使我在之前或之后做过“表演”也没有。

I can't have the form "topMost" all the time. 我不能一直有“topMost”的形式。 I just want it to pop into the foreground as if someone clicked its caption. 我只是想让它弹出前景,好像有人点击了它的标题。 if other windows are shown after it, it should be under them. 如果在它之后显示其他窗口,它应该在它们之下。

I am so desperate with this C**p not working I'm considering doing a mouse click simulation that'll shoot my window/form to the front. 我非常绝望,这个C ** p无法工作我正在考虑做一个鼠标点击模拟,将我的窗户/窗体射到前面。

Is this really a bug in .NET? 这真的是.NET中的一个错误吗?

I believe you want the Activate method instead. 我相信你想要的是Activate方法。 "BringToFront" is inherited from the base "Control" class and just reorders a control within the current form. “BringToFront”继承自基类“Control”类,只是在当前表单中重新排序控件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM