I have a popup form within my application that I want to show for only
about 10 seconds. On this form by the way has an AVI that plays. I want
the form to popup on click of a button and close after 10 seconds
automatically but can't figure out how to do it, does nayone know how
to do this? 8 19679
Add a timer to the form, set it for 10 seconds, when it
goes off, in your event handler, close the form.
Robin S.
--------------------------------------------
<ma******@yahoo.comwrote in message
news:11**********************@f1g2000cwa.googlegro ups.com...
>I have a popup form within my application that I want to show for only
about 10 seconds. On this form by the way has an AVI that plays. I want
the form to popup on click of a button and close after 10 seconds
automatically but can't figure out how to do it, does nayone know how
to do this?
Here's one way using a timer:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim t As Timer = New Timer()
t.Interval = 10000
AddHandler t.Tick, AddressOf HandleTimerTick
t.Start()
End Sub
Private Sub HandleTimerTick()
Me.Close()
End Sub
Thanks,
Seth Rowe ma******@yahoo.com wrote:
I have a popup form within my application that I want to show for only
about 10 seconds. On this form by the way has an AVI that plays. I want
the form to popup on click of a button and close after 10 seconds
automatically but can't figure out how to do it, does nayone know how
to do this?
Here's one way using a timer:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim t As Timer = New Timer()
t.Interval = 10000
AddHandler t.Tick, AddressOf HandleTimerTick
t.Start()
End Sub
Private Sub HandleTimerTick(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Me.Close()
End Sub
Thanks,
Seth Rowe ma******@yahoo.com wrote:
I have a popup form within my application that I want to show for only
about 10 seconds. On this form by the way has an AVI that plays. I want
the form to popup on click of a button and close after 10 seconds
automatically but can't figure out how to do it, does nayone know how
to do this?
Robin,
I tried the timer thing, I placed it within the form load maybe that is
the wrong place to have it, but anyway, after the time the form didn't
go away.
here is my code
t.Interval = 100
t.Enabled = True
While t.Interval < 10000
t.Interval += 100
End While
frmAVI.Close()
RobinS wrote:
Add a timer to the form, set it for 10 seconds, when it
goes off, in your event handler, close the form.
Robin S.
--------------------------------------------
<ma******@yahoo.comwrote in message
news:11**********************@f1g2000cwa.googlegro ups.com...
I have a popup form within my application that I want to show for only
about 10 seconds. On this form by the way has an AVI that plays. I want
the form to popup on click of a button and close after 10 seconds
automatically but can't figure out how to do it, does nayone know how
to do this?
ma******@yahoo.com wrote:
I have a popup form within my application that I want to show for only
about 10 seconds. On this form by the way has an AVI that plays. I want
the form to popup on click of a button and close after 10 seconds
automatically but can't figure out how to do it, does nayone know how
to do this?
So everyone else is suggesting Timers. I was going to suggest that as
well, but I wanted to be different! ;)
Is there a way you can detect when the AVI stops playing? If so, you
could detect the end of the AVI and then close the form. This *might*
be better than a fixed time limit of 10 seconds, in cases where the
system hangs for 1 or 2 seconds while the AVI is playing (actuallly,
probably while it's loading).
Unfortunately, I don't know how to do that in code (never done AVI's in
VB). But it's a different suggestiong.
If he starts it as a process he could do:
dim p as System.Diagnostics.Process = Process.Start(..)
p.WaitfoExit()
me.Close()
I too have never messed with AVIs, hopefully the OP will share how he
starts it.
Thanks,
Seth Rowe
lord.zol...@gmail.com wrote:
ma******@yahoo.com wrote:
I have a popup form within my application that I want to show for only
about 10 seconds. On this form by the way has an AVI that plays. I want
the form to popup on click of a button and close after 10 seconds
automatically but can't figure out how to do it, does nayone know how
to do this?
So everyone else is suggesting Timers. I was going to suggest that as
well, but I wanted to be different! ;)
Is there a way you can detect when the AVI stops playing? If so, you
could detect the end of the AVI and then close the form. This *might*
be better than a fixed time limit of 10 seconds, in cases where the
system hangs for 1 or 2 seconds while the AVI is playing (actuallly,
probably while it's loading).
Unfortunately, I don't know how to do that in code (never done AVI's in
VB). But it's a different suggestiong.
Matt,
I find this a nice one, http://www.vb-tips.com/dbpages.aspx?...f-cfc96c6ca913
I hope this helps,
Cor
<ma******@yahoo.comschreef in bericht
news:11**********************@f1g2000cwa.googlegro ups.com...
>I have a popup form within my application that I want to show for only
about 10 seconds. On this form by the way has an AVI that plays. I want
the form to popup on click of a button and close after 10 seconds
automatically but can't figure out how to do it, does nayone know how
to do this?
Seth,
Actually I didn't do anything special to start the AVI. I am using an
Animation Control that automatically starts the AVI for me.
I did the timer thing like that which was mention and it work perfectly
thank you
rowe_newsgroups wrote:
If he starts it as a process he could do:
dim p as System.Diagnostics.Process = Process.Start(..)
p.WaitfoExit()
me.Close()
I too have never messed with AVIs, hopefully the OP will share how he
starts it.
Thanks,
Seth Rowe
lord.zol...@gmail.com wrote:
ma******@yahoo.com wrote:
I have a popup form within my application that I want to show for only
about 10 seconds. On this form by the way has an AVI that plays. I want
the form to popup on click of a button and close after 10 seconds
automatically but can't figure out how to do it, does nayone know how
to do this?
So everyone else is suggesting Timers. I was going to suggest that as
well, but I wanted to be different! ;)
Is there a way you can detect when the AVI stops playing? If so, you
could detect the end of the AVI and then close the form. This *might*
be better than a fixed time limit of 10 seconds, in cases where the
system hangs for 1 or 2 seconds while the AVI is playing (actuallly,
probably while it's loading).
Unfortunately, I don't know how to do that in code (never done AVI's in
VB). But it's a different suggestiong.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dan |
last post by:
Question on how to do this.
I'm trying to make a script that has 3 text fields in a form. When a
start time is entered in a text field in the form the other 2 fields
display the time with a set...
|
by: Vivek Sharma |
last post by:
How can I close a form in C#?
Here is the code that I am using but closes everything?
private void frmSplash_Click(object sender, EventArgs e)
{
this.Close();
Form frmLogin = new...
|
by: dwilliamjoe |
last post by:
VB.net, launch procedure, close form, the whole APP is deactivated.
When I say deactivated, other applications (Wind Explorer, My computer,
Ect...) come to the foreground and my app goes to the...
|
by: Mindy |
last post by:
I have two questions here:
(1) what is the difference of close form and close table?
(2) How "Prompt" works
I used close form macro in my database. I hope when a user close the
form, he/she will...
|
by: Robert Dufour |
last post by:
On my form if the user clicks the upper right hand corner to close the form
I want to trap that event and do a check to see if closing is allowed, if
not, I want to stop the form closing action.
...
|
by: kev |
last post by:
Hi folks,
I have a form for registration (frmRegistration) whereby i have two
buttons. One is Save which saves record using the OnClick property. I
used wizard to create the save button. The...
|
by: jpr |
last post by:
I am using moduled to open forms. I run them from a menu that I have
created on the toolbar. The source of the forms are queries all with
record source to "lstpreinterview" on a form named eforms....
|
by: AccessIdiot |
last post by:
Hello all,
I have a form (frm_Entrainment) with a button that opens a 2nd form (frm_Specimen_Entrainment). The 2nd form shares an ID field with the first form (Entrainment_ID - its like opening...
|
by: Hulas |
last post by:
Guys, I have two questions.
(a) How do I add two fields of the same table to a single combo box. For example if I have two fields ID1 and ID2 in a table called Identification, than how should I...
|
by: ncsthbell |
last post by:
I have an MS2007 access database. On one of the forms that is used to edit/change data, there is a button 'Return to main menu'. Once the user has finished making the changes on the form and clicks...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |