Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27465

VS 2019 [RESOLVED] Handle Focus on second Form with two forms

$
0
0
Hi,
I created a form called form1 with FormBorderStyle set to none and where on top there is a panel called TitlePanel in order to handle form1 moving.
With a ToolStripmenuItem I open a second form called form2:
Code:

...
dim myNewForm as new form2
myNewForm.Focus()
myNewForm.BringToFront()
myNewForm.activate()
 myNewForm.Show()

When form2 is active, if I move mouse pointer on TitlePanel without clicking, form1 is activated and it brings to front instead of staying behind form2.
Meanwhile I want that form1 is activated only when I click with mouse on TitlePanel.

I believe that I have to handle TitlePanel.MouseHover on form1 but I don't know how to specify the form1 to stay behind form2

Thank in advanced
gio

Viewing all articles
Browse latest Browse all 27465

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>