Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Visual Basic
Expertise: Beginner
Jan 13, 1999



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Taking a Form in Front of Another Form

When building a floating toolbar, you might need to keep it in front of the main form of your application. This took time to do in VB3 and VB4, because you had to resort to API functions. In VB5, you can take advantage of a new, optional argument of the Show method:
' within the main form
frmFloating.Show 0, Me
The second argument sets the owner form for the window being displayed. The "owned" form will always be in front of its owner, even when it doesn't have the input focus. Moreover, when the owner form is closed, all its owned forms are automatically closed also.
Francesco Balena
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date