
Disable close-button in windows titlebar
From several sources :
Subject:
[VB] X on the form
Date:
Tue, 9 Jun 1998 10:11:40 -0400
From:
Reply-To:
"Visual Basic Beginner's List"
To:
For an example that removes items from the system menu, go to
http://www.vb-helper.com/HowToInt.htm and click the "Remove items from a
form's system menu" link.
==============
Subject:
Re: [VB] X on the form
Date:
Mon, 8 Jun 1998 10:50:32 -0400
From:
Reply-To:
"Visual Basic Beginner's List"
To:
You can set the form to modal and that way the user has to perform some
function on the form before it can close. The box will not appear on
the form.
myform.show vbmodal
Also, you can set a variable to be set to true when a form closes.
Here is how I used this:
Private Sub cmdClose_Click()
On Error GoTo Error_cmdClose_Click
' indicates that it is time to reset the static variables
' to zero
resetPeriod = True
resetTime = True
' reset to zero for error trapping purposes
TestNumber = 0
Unload Me
Exit_cmdClose_Click:
Exit Sub
Error_cmdClose_Click:
MsgBox Err.Description, vbInformation, _
"Error " & Err.Number & " - cmdClose_Click"
Resume Exit_cmdClose_Click
End Sub
--- Jim
"Will the road you're on get you to My place ?" - God
_\|/_
(o o)
------oOO-{_}-OOo------