|
-
May 9th, 2002, 12:39 PM
#1
Thread Starter
Hyperactive Member
Help!
VB Code:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
How do i use the Cancel?
-
May 9th, 2002, 12:40 PM
#2
Frenzied Member
Depending on the condition
Cancel = True
OR
Cancel = False
-
May 9th, 2002, 12:41 PM
#3
set its value to anything but 0 and it will cancel the unload event
-
May 9th, 2002, 12:43 PM
#4
Thread Starter
Hyperactive Member
woo cheers
-
May 9th, 2002, 12:50 PM
#5
And, purely for informational purposes, here is what UnLoadMode means.
VB Code:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
'there are 5 unloadmode levels
Select Case UnloadMode
Case vbFormControlMenu 'UnloadMode 0
'form is being unloaded via the Close
'command from the System menu
Case vbFormCode 'UnloadMode 1
'Unload Me has been issued from code
Case vbAppWindows 'UnloadMode 2
'Windows itself is closing
Case vbAppTaskManager 'UnloadMode 3
'the Task Manager is closing the app
Case vbFormMDIForm 'UnloadMod 4
'an MDI child form is closing because
'its parent form is closing
End Select
End Sub
-
May 9th, 2002, 12:55 PM
#6
Which, by the way, is contradictory to the help file for the queryunload, which states that unloadmode is always 0.
That file is wrong, Hack is right.
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
May 9th, 2002, 01:02 PM
#7
Originally posted by Lord_Rat
Which, by the way, is contradictory to the help file for the queryunload, which states that unloadmode is always 0.
That file is wrong, Hack is right.
maybe they changed it.. what MSDN are you using... mine doesn't say that (october 2000)
-
May 9th, 2002, 01:08 PM
#8
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
May 9th, 2002, 01:11 PM
#9
hmmm so MS got dumber i guess huh???
-
May 9th, 2002, 01:17 PM
#10
It's possible they wrote multiple articles on the subject and I'm looking at an older one.
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|