Basics of the Windows Forms Library - 4.8 Making a Form the Top-Most Form (Page 3 of 4 )
Problem
You want a specific form to appear on top of all other forms in your application, no matter which form is selected.
Solution
If you wish to have a Toolbox-type form that is accessible at the same time as other forms but always remains on top, set the form’s TopMost property to True.
Discussion
If you also want to disable access to all other forms, open the important form of the moment using its ShowDialog() method:
Form1.ShowDialog()
No other forms already displayed by the application will be available until theShowDialog()form closes.
Next: 4.9 Indicating the Accept and Cancel Buttons on a Form >>
More Visual Basic.NET Articles
More By O'Reilly Media
|
This article is excerpted from chapter four of the Visual Basic 2005 Cookbook, written by Tim Patrick and John Clark Craig (O'Reilly; ISBN: 0596101775). Check it out today at your favorite bookstore. Buy this book now.
|
|