用户单击弹出区域外会发生什么事件? (winapp的) [英] What the event when user click out of area of pop up? (winapp)

查看:75
本文介绍了用户单击弹出区域外会发生什么事件? (winapp的)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用户单击弹出区域外会发生什么事件? (winapp).

我的问题是当用户通过 showdialog()命令在窗口应用程序中打开弹出对话框时.然后用户单击非弹出区域.我想收到有关用户点击区域错误的警报消息.我该怎么办?


这是我的详细信息和问题的图片
< img border ="0" src ="http://image.free.in.th/z/tv/dialogquestion.jpg"alt ="免费图片.in.th"/>

如果您有解决此问题的想法.也请帮助我.

What the event when user click out of area of pop up? (winapp).

The my problem is when user open pop up dialog form in window application by showdialog() command. Then user click the area that is not pop up area. I want to have alert message about wrong click area to user. How can I do?


This is my detail and picture of my problem
<img border="0" src="http://image.free.in.th/z/tv/dialogquestion.jpg" alt="images by free.in.th"/>

If you have the idea for resolve this problem. Please help me too.

推荐答案

我不认为有此类事件调度到您的应用程序.当然,如果单击以激活(其他应用程序的)其他窗口,则会收到一个事件,表明您的应用程序已被停用.它的详细信息取决于您与我们共享的应用程序类型或使用的UI库(WPF,Forms还是其他?).

在实践中,它是永远不需要的.如果您可以解释此活动的最终目标,那么它会更有用.

—SA
I don''t think there is such event dispatched to your application. If you click to activate some other window (of some other application), you will get an event signalling your application is deactivated, of course. The detail of it depends on your application type or UI library you use (WPF? Forms? something else?) which you did share with us.

In practice, it''s never needed. If you could explain the ultimate goal of this activity, it would be more useful.

—SA


我通过以下代码解决了我的问题:
I resolve my problem by this code :
static int y = 0;
static int x = 0;
private const int WM_WINDOWPOSCHANGING = 0x0046;

protected override void WndProc(ref Message m)
{
    if (m.Msg == WM_WINDOWPOSCHANGING && this != null)
    {
        this.Location = new Point(x, y);
    }
    base.WndProc(ref m);
}


这篇关于用户单击弹出区域外会发生什么事件? (winapp的)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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