Re: Form1_Active()
- From: "Dag Sunde" <me@xxxxxxxxxxxx>
- Date: Mon, 31 Oct 2005 07:36:33 GMT
"ProfitMaxTrading.com" <nospam@xxxxxxxxxx> wrote in message
news:pif9f.4686$LR1.4444@xxxxxxxxxxxxx
> I've got a real baffling problem this evening.
>
> Seems something within my program is triggering the main Form1_Active()
> where I have one line of code. Because of this triggering, it is running
> this code when I don't want it to. For now I've relocated the code to my
> Main() routine. It is simply to clear out a dynamic array (ie. Redim
> aMyArray(1) )
>
> So although my initial problem is solved and all works well, I'd still
> like to know what is triggering the forms _Active().
>
> It was my understanding that this only runs when the Form is first created
> and shown. Since this is my main form, I'm not opening and closing it. So
> does anyone know why Active() would get called? I've tried stepping
> through the program but it doesn't help. It steps all the way to the end
> without ever going to Active(). Yet run the program and after it calls it
> initially at startup, when I run this one draw routine on a Picture object
> (like I do with all my other tools that do not seem to cause Active() to
> run), Active is called out of nowhere.
>From the "F1" key:
"
Activate - occurs when an object becomes the active window
An object can become active by user action, such as clicking it,
or by using the Show or SetFocus methods in code.
The Activate event can occur only when an object is visible.
For example, a form loaded with the Load statement isn't visible
unless you use the Show method or set the form's Visible property
to True.
The Activate and Deactivate events occur only when moving the focus
within an application. Moving the focus to or from an object in
another application doesn't trigger either event. The Deactivate
event doesn't occur when unloading an object.
The Activate event occurs before the GotFocus event; the LostFocus
event occurs before the Deactivate event.
"
--
Dag.
.
- Follow-Ups:
- Re: Form1_Active()
- From: ProfitMaxTrading.com
- Re: Form1_Active()
- References:
- Form1_Active()
- From: ProfitMaxTrading.com
- Form1_Active()
- Prev by Date: Re: Labels
- Next by Date: Re: RealBASIC - What do you think about it?
- Previous by thread: Form1_Active()
- Next by thread: Re: Form1_Active()
- Index(es):
Relevant Pages
|