Ask the MultiValued Visual
Basic Expert - #11A
(as published in Spectrum
magazine Sep/Oct 1998)
To email your questions to "Ask the MultiValued VB
Expert", click here.
Copyright © 1996-98 Caduceus Consulting. All rights reserved.

Disabling the 'X' Close Button
Dear Andrew:
I had
the pleasure of attending your Visual Basic Class for Pick
Programmers recently and have begun developing in VB5. I have a
question that I hope you can answer: How can I disable ONLY the
X (Close) [on a Visual Basic form]? Id like to
keep the Minimize and Maximize buttons but drop the
X. I cant seem to achieve this at either design
time or run time. - Alex Vlassis
Glad you
enjoyed the class, Alex. You have a good question with a
non-obvious but simple answer. In the properties window for the
form, set the ControlBox property to False and ensure that the
Maxbutton and Minbutton properties are True. The control menu at
the top left of the window will not appear and the X
close button will be disabled, but you will still have your
minimize and maximize buttons.

To email your questions to "Ask the MultiValued VB
Expert", click here.
Copyright © 1996-98 Caduceus Consulting. All rights reserved.
Added: August 21, 1998.
Return to Caduceus
Consulting Home Page