Results 1 to 9 of 9

Thread: Timer question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2003
    Posts
    108

    Timer question

    Hello there,

    I am creating a webapplication(Online exam) using VB.Net. I'd like to set a time limit on the form(webform) so that the user would be able see how much time left on the exam. And at the end of the time limit, the form will shut down automatically.

    For example: the time limit on the exam is 30 minutes. When the form loads, the time (lable) will show 30:00. And then 29:59, 29:58......so on until it reaches 00:00.

    Does anybody know how to do this problem?

    As I understand, VB.Net does not have a timer control like VB6. So I am thinking perhaps a little VBScript embeded to the webform. If this is the case, does anybody have any idea how to write that vbscript? It'd be very appreciated if anyone can help me on this problem.

    Thanks.

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    JavaScript...

  3. #3
    Hyperactive Member VBD's Avatar
    Join Date
    Apr 2001
    Location
    The Place Above The Place Below Heavin
    Posts
    278

    huh?

    IVB.NET definitly has a timer, which is just like the one in VB6. Its just under "Components" (in the toolbox) instead of "Windows Forms"
    Hello

  4. #4
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    there are actually 3 timers: windows forms, system and thread. the system probably would be best in your case since it is more acurate than the forms and your app doesn't really need the precision / resources used by the threaded.

  5. #5
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Hi.

    True, there are plenty of timers in VB, but Hellswraith right.
    You have to do it in Java or VBS as a clientside script, unless you want your page to reload every second. Which might be a bit disturbing for the poor students
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  6. #6
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    No doubt the logic must be done at the client for this type of thing.

    This is OT, but I've seen many questions like this, and I've never understood the "why". What the heck, spit out a page, tell the user they have x number of minutes to submit, if they're late, they loose. So sorry.

    If you're mean enough to have a time limit, why bother being nice enough to show them how much time is left? Heck, they already have many clocks.

    Just my unsolicited opinion

    Mike

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jan 2003
    Posts
    108
    So, despite of Mike Hildner’s opinion. Does anybody have such script (VBS or Java)?

    Thanks.

  8. #8
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Jan 2003
    Posts
    108
    Thanks Mike!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width