set visible to false 
Author Message
 set visible to false

Help please ......

    I have a frame within a form.
    I want to set  the frame.visible to false  after  the form  is sitting
idle for 5 seconds.
    In what events do I have to set the visible property of the frame to
false.
    I have tried the following events within the form :
         activate, unload, deactivate en so on,   with no result.
    What I want to happen is : that the frame disappears without any
intervention after 5 seconds.


    thank you kindly
     rudy



Thu, 14 Oct 2004 13:50:09 GMT  
 set visible to false
VB provides no way to determine if no interaction is taking place, or if the
application is idle.  I've seen some complicated API methods to determine
idle time, but in general its not worth pursuing.

How about hiding the frame 5 seconds after the user performs a specific and
anticipated action, rather than attempting to determine if the form is
inactive. In this case, place a timer on the form, set the interval to 5000,
and set enabled to true at the end of the "anticipated" event. In the timer
event you need only 2 lines ..

Timer1.Enabled = False
Frame1.Visible = False

In the "anticipated" event you should also add as the first line of code a
Timer1.Enabled = False statement, so the panel won't disappear if the user
reactivates the event. (i.e.)

sub <some_event_click>

  'user entered event, so prevent hiding
   Timer1.Enabled = False

    <do whatever>

  'prepare to hide frame if this event not used again within 5 seconds
   Timer1.Interval = 5000
   Timer1.Enabled = False

end sub

--

Randy Birch
MVP Visual Basic
http://www.mvps.org/vbnet/
Please respond only to the newsgroups so all can benefit.


Quote:
> Help please ......

>     I have a frame within a form.
>     I want to set  the frame.visible to false  after  the form  is sitting
> idle for 5 seconds.
>     In what events do I have to set the visible property of the frame to
> false.
>     I have tried the following events within the form :
>          activate, unload, deactivate en so on,   with no result.
>     What I want to happen is : that the frame disappears without any
> intervention after 5 seconds.


>     thank you kindly
>      rudy



Thu, 14 Oct 2004 22:00:27 GMT  
 set visible to false
Randy,
   That is very nice of you replying to my question.

kind regards,
rudy


Quote:
> VB provides no way to determine if no interaction is taking place, or if
the
> application is idle.  I've seen some complicated API methods to determine
> idle time, but in general its not worth pursuing.

> How about hiding the frame 5 seconds after the user performs a specific
and
> anticipated action, rather than attempting to determine if the form is
> inactive. In this case, place a timer on the form, set the interval to
5000,
> and set enabled to true at the end of the "anticipated" event. In the
timer
> event you need only 2 lines ..

> Timer1.Enabled = False
> Frame1.Visible = False

> In the "anticipated" event you should also add as the first line of code a
> Timer1.Enabled = False statement, so the panel won't disappear if the user
> reactivates the event. (i.e.)

> sub <some_event_click>

>   'user entered event, so prevent hiding
>    Timer1.Enabled = False

>     <do whatever>

>   'prepare to hide frame if this event not used again within 5 seconds
>    Timer1.Interval = 5000
>    Timer1.Enabled = False

> end sub

> --

> Randy Birch
> MVP Visual Basic
> http://www.mvps.org/vbnet/
> Please respond only to the newsgroups so all can benefit.



> > Help please ......

> >     I have a frame within a form.
> >     I want to set  the frame.visible to false  after  the form  is
sitting
> > idle for 5 seconds.
> >     In what events do I have to set the visible property of the frame to
> > false.
> >     I have tried the following events within the form :
> >          activate, unload, deactivate en so on,   with no result.
> >     What I want to happen is : that the frame disappears without any
> > intervention after 5 seconds.


> >     thank you kindly
> >      rudy



Thu, 14 Oct 2004 21:08:35 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VB5.0 listview Control not disappearing after setting visible to false?

2. Datagrid - set column visible to false

3. Help,Can't set listview.visible = false

4. Continuous form visible = false

5. CommandButton.Visible = False

6. Visible = False Documents.Add

7. difference between form1.visible = false and form1.hide

8. difference between form1.visible = false and form1.hide

9. Form.Visible=False - Doesn't work??

10. ActiveMovie Position (Make control Visible=False after avi file plays)

11. Obj.Visible=False won't

12. Form.Visible=False - Doesn't work???

 

 
Powered by phpBB® Forum Software