How to disable the 'close' option of a window? 
Author Message
 How to disable the 'close' option of a window?

With the 'ControlBox' property you can, at design time, make the 'X' icon
on the upper right corner of the window appear or disappear. However, how
can you make it be visible but disabled (grayed)?
I must decide if a window is closable at run time, not at design time.
--
Francesc Hervada i Sala
Modul 4, Serveis Informatics, S. L.
Barcelona, Spain



Wed, 14 Jul 1999 03:00:00 GMT  
 How to disable the 'close' option of a window?


Fri, 19 Jun 1992 00:00:00 GMT  
 How to disable the 'close' option of a window?

 Hi,

 << With the 'ControlBox' property you can, at design time, make the 'X' icon
 on the upper right corner of the window appear or disappear. However, how
 can you make it be visible but disabled (grayed)?
 I must decide if a window is closable at run time, not at design time. >>

 "close" option in controlBax can be disabled by calling API functions
 GetSystemMenu and ModifyMenu.

 You may want to refer to the following Microsoft Knowledge base Article.

 Title : How to Disable Close Command in VB Control Menu (System Menu)
 ID: Q82876

 (This article is available at -
  http://www.microsoft.com/kb
  product : Visual Basic   Search on article ID. )

  Note: If you are using VB 4.0 use the proper API declarations.

 Have a nice day ..

 - Vinaya
 Aditi Aorp.

 Aditi Corp was formerly known as NetQuest Inc.



Fri, 16 Jul 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to disable MDI form's maximize option

2. default 'option explicit on' and 'option strict on'

3. Help: How to disable Window's Popup menu

4. Disable focus-change on windows'.

5. CreateTableDef 'attributes' option

6. Option Groups 'Why No SetFocus'

7. 'keep track of formatting' option

8. Sending an Outlook mail from my VBA-code doesn't close the mail windows

9. Visual Basic - Trapping Minimize/Maximize/Close Events (from the window's buttons)

10. Simultaneous closing of an activex control and the browser window it's running in

11. Disable Word close option!

12. Can't close windows...

 

 
Powered by phpBB® Forum Software