Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I am new to VB.Net and I am working on a program that will allow you to enter information into text boxes. The information must be entered within so many seconds and then the program ends. I would like to capture the control information before the program ends so I can print the results later. Below is my code...how can I capture the information before the 34 seconds is up?

VB
Imports System.ComponentModel


Public Class escalationForm

    Private Sub escalationForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        My.Computer.Audio.Play(My.Resources.Adan, AudioPlayMode.Background)
        'Automatically plays audio file

    End Sub

    Private timer1 As New Timer

    Public Sub New()

        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.
        timer1.Interval = 34000
        timer1.Enabled = True
        AddHandler timer1.Tick, AddressOf Timer1_Tick
    End Sub
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim f2 As New introTask2
        f2.Show()
        timer1.Enabled = False
        Close()
    End Sub

End Class
Posted
Comments
Sergey Alexandrovich Kryukov 20-May-11 12:51pm    
This code in unrelated to the title (except PrintForm1.Print). Timer, Audio.Play...

Is it just a mistake or you're trying to fake some activity by posting gibberish? Please stop posting such things.
--SA

1 solution

You need to use a TimerCallBack delegate [^] that executes once the time elapses.

To capture the screen, you can look at the following link[^].
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 20-May-11 12:53pm    
Abhinav, please look at other OP posts and my comment to the question.
This is fake and nearly spam by OP.
--SA
Abhinav S 21-May-11 0:41am    
One tries to help!
Sergey Alexandrovich Kryukov 22-May-11 1:21am    
If you mean yourself as a helper, you got my 5.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900