本文介绍了显示表格而不会失去焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在创建带有通知的Messenger(类似于MSN).
如何显示通知窗口,而又不会失去对活动表单的关注?
我尝试过了
I am creating a messenger with a notification(MSN like).
How Can i show a notification windows without losing my focus on my active form?
i tried this
Private Declare Function ShowWindow Lib "user32" (ByVal handle As IntPtr, ByVal nCmdShow As Integer) As Integer
Private Const SW_SHOWNA As Integer = 4
Private Sub ShowForm()
ShowWindow(Me.Handle, SW_SHOWNA)
End Sub
还有这个
and this
Protected Overrides ReadOnly Property ShowWithoutActivation() As Boolean
Get
Return True
End Get
End Property
但是它们都不起作用.
每次弹出通知窗口时,我总是会失去对活动表单的关注.
谢谢.
But none of them working.
Everytime a notification windows pop up, i always lost my focus on my active form.
Thanks.
推荐答案
这篇关于显示表格而不会失去焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!