From: Horst Heinrich Dittgens on
> Why would MS include End if I cannot or should not use it, etc?


Well, some companies install air bags in their cars while strongly
requesting driver operation characteristics which never should require them.

In other words, you CAN use your car's air bags, although you shouldn't.

From: Nobody on

"C. Kevin Provance" <*@*.*> wrote in message
news:uIGTdtP1KHA.4548(a)TK2MSFTNGP06.phx.gbl...
>> As as far as your opinion of me, I tend not to lend any real
>> credibility to those who go out of their way to remain
>> anonymous...I don't >> care how helpful or "knowledgeable" you are.
>> If you want to label me, do it to me under your real name, man to
>> man. Otherwise >> it's a coward move. You also should know this
>> by now.

>> At least numbwits like Paul and Tom have the balls to use their
>> name to take their swipes. What's your excuse, besides being >>
>> "Nobody"?

Coward? More likely it is none of your business. Man to man on an
internet usenet group? Please. If you want my real name, it is Scott
Eaton, now what difference does that actually make? Going to Google me
and attempt to track me down if you don't like my posts. Be my guest.


From: Helmut Meukel on
"mscir" <mscir(a)yahoo.com> schrieb im Newsbeitrag
news:hp6ahk$12m1$1(a)adenine.netfront.net...
> Also I've saved these over the years:
>
> 1------------------------------------------------------------------------
> Subject: Re: Unload Form, Set Form=Nothing, End, program doesn't end!
> Date: Thu, 19 Mar 1998 17:34:52 -0500
> From: "A Consultant" <consultant(a)towers.com>
> Newsgroups: microsoft.public.vb.general.discussion
>
> Make sure that you turn OFF all TIMER controls! Forms stay loaded if timers
> still active.
>
> Sincerely,
> Marc Schreiber tech(a)sunbeltinc.com
>


As many suggestions made for avoiding End this one is plain wrong!
The Timer control that comes with VB6 is shut down automatically
when you unload the form it is placed on!

What you have to release/shut down are any system timers (API)
or third party timer controls using API functions.

Helmut.

From: Nobody on
"Helmut Meukel" <NoSpam(a)NoProvider.de> wrote in message
news:Ob2PUNa1KHA.2028(a)TK2MSFTNGP05.phx.gbl...
> "mscir" <mscir(a)yahoo.com> schrieb im Newsbeitrag
> news:hp6ahk$12m1$1(a)adenine.netfront.net...
>> Also I've saved these over the years:
>>
>> 1------------------------------------------------------------------------
>> Subject: Re: Unload Form, Set Form=Nothing, End, program doesn't end!
>> Date: Thu, 19 Mar 1998 17:34:52 -0500
>> From: "A Consultant" <consultant(a)towers.com>
>> Newsgroups: microsoft.public.vb.general.discussion
>>
>> Make sure that you turn OFF all TIMER controls! Forms stay loaded if
>> timers still active.
>>
>> Sincerely,
>> Marc Schreiber tech(a)sunbeltinc.com
>>
>
>
> As many suggestions made for avoiding End this one is plain wrong!
> The Timer control that comes with VB6 is shut down automatically
> when you unload the form it is placed on!

It doesn't shut down until Form_Unload is finished executing. If there is
code there that waits for something and calls DoEvents, Timer events will
still fire, however, they don't fire if not calling DoEvents. Example: just
place a Timer on Form1, and use the following code:

Option Explicit

Dim bExiting As Boolean

Private Sub Form_Load()
Timer1.Interval = 500
End Sub

Private Sub Form_Unload(Cancel As Integer)
Dim t As Single

bExiting = True
' 5 Seconds delay
t = Timer
Do While Timer - t < 5
DoEvents
Loop

End Sub

Private Sub Timer1_Timer()
If bExiting Then
Debug.Print "Timer1_Timer called while bExiting is true"
End If
End Sub


Output:

Timer1_Timer called while bExiting is true
Timer1_Timer called while bExiting is true
Timer1_Timer called while bExiting is true
Timer1_Timer called while bExiting is true
Timer1_Timer called while bExiting is true
Timer1_Timer called while bExiting is true
Timer1_Timer called while bExiting is true
Timer1_Timer called while bExiting is true
Timer1_Timer called while bExiting is true
Timer1_Timer called while bExiting is true



From: Larry Serflaten on

"Helmut Meukel" <NoSpam(a)NoProvider.de> wrote

> > 1------------------------------------------------------------------------
> > Subject: Re: Unload Form, Set Form=Nothing, End, program doesn't end!
> > Date: Thu, 19 Mar 1998 17:34:52 -0500
> > From: "A Consultant" <consultant(a)towers.com>
> >
> > Make sure that you turn OFF all TIMER controls! Forms stay loaded if timers
> > still active.
> >
>
> As many suggestions made for avoiding End this one is plain wrong!
> The Timer control that comes with VB6 is shut down automatically
> when you unload the form it is placed on!


When did VB6 come out? (Mid 1998?) If you look at the date of the
message, VB6 was either very new or not yet released! They must have been
talking about VB5 or prior, for which the advice is still valid.

So... backwards compatible and all that.... :-)

LFS


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Prev: Convert UTF-16 Unicode to UTF-8 Unicode?
Next: API-Guide