Results 1 to 6 of 6

Thread: controlbox not visible [RESOLVED]

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Location
    belgium
    Posts
    12

    controlbox not visible [RESOLVED]

    hi
    i want the "X" to disappear from the form when i click on a menu:

    Private Sub faq_Click()
    help.Show
    Delta.ControlBox.Visible = False
    End Sub

    help please
    Last edited by scooterbizkit; Nov 1st, 2003 at 05:57 PM.

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    Why hide it? (I assume you arte just talking about the "X" and not the whole control box)

    VB Code:
    1. Option Explicit
    2. Private mbAllowClose As Boolean
    3. Private Sub faq_Click()
    4.     help.Show
    5.     mbAllowClose = False
    6. End Sub
    7.  
    8. Private Sub Form_Load()
    9.     mbAllowClose = True
    10. End Sub
    11.  
    12.  
    13. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    14.  
    15.     If UnloadMode = vbFormControlMenu And Not mbAllowClose Then
    16.         Cancel = True
    17.         MsgBox "Nope, can't do that"
    18.     End If
    19.  
    20. End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Location
    belgium
    Posts
    12
    hi,
    i'd just like the X to disappear or get disabled when i open a new window by pressing on a commandbutton so that ull have to close that new window before the old one. i want the "X" to get enabled again when i close the new window.
    what's wrong with:
    VB Code:
    1. Private Sub faq_Click()
    2. help.Show
    3. firstwindow.ControlBox.Visible = False
    4. End Sub

  4. #4

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Location
    belgium
    Posts
    12
    thanks
    exactly what i need

  6. #6
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    In future posts of yours let me suggest something. Rather that saying how you want to do something like you did initially, it's better just to state what you want to do. In this case it would have been something like "I want to prevent the user from closing form1 until after form2 is closed". Hope that helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width