形式没有焦点/激活 [英] Form without focus/activation

查看:198
本文介绍了形式没有焦点/激活的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为我的多行文本框实现类似于intellisense的功能。智能控件被放置在没有控制框的标准形式中(所以,没有标题或最大化/最小化bottons是可见的)。

所有的工作都很好,但是如果智能形式是显示和用户点击到智能感知表单,主表单失去焦点(所以,用户必须回到文本框写作)。

我知道 ShowWithoutActivation 属性,但是它只在激活时才起作用,而不是在标准焦点上。
$ b 编辑



我在 http ://www.daniweb.com/software-development/csharp/threads/273724 ,但提供的代码不起作用。它会在Show()方法中抛出无效的参数异常。解决方案

我找到了解决方案:创建一个不重要的表单


I want to implement intellisense-like feature for my multiline textbox. The intellisense control is placed in standard form without control box (so, no title or maximize/minimze bottons are visible).

All works fine, but if intellisense-form is shown and user clicks into the intellisense form, the main form lost focus (so, user must click back into textbox for writing).

I know ShowWithoutActivation property, but it works only on activation, not on "standard focus".

EDIT:

I found the help on http://www.daniweb.com/software-development/csharp/threads/273724 , but the presented code does not work. It throws "Invalid parameter" exception during "Show()" method.

解决方案

I found the solution: Creating a Form That Doesn't Take Focus.

这篇关于形式没有焦点/激活的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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