开发者

Show form without losing focus [duplicate]

开发者 https://www.devze.com 2023-01-13 06:34 出处:网络
This question already has answers here: Show a Form without stealing focus? (19 answers) 开发者_如何学JAVAClosed 6 years ago.
This question already has answers here: Show a Form without stealing focus? (19 answers) 开发者_如何学JAVA Closed 6 years ago.

I've created a small form that acts like the office notifications (fades in\out above the notification icon tray)

I'm having problems showing this form, I want to display it without the focus being taken from my main application (or any other form), I've managed to get the attached code doing roughly this, (using Me.Activate to take back focus) But this isn't great - focus switches for an instant plus I want to show the form from various areas in my application...

  Dim frm2 As New frmNotification()
    frm2.TopMost = True
    frm2.Show()
    Me.Activate()

Any Ideas?


A similar question has been answered here.

Show a Form without stealing focus?

The code is in c#, let me know if you need help in converting it to vb.net. Sorry for the delay.

0

精彩评论

暂无评论...
验证码 换一张
取 消