Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8843317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:11:25+00:00 2026-06-14T11:11:25+00:00

I am developing an app for windows phone. My question is how can I

  • 0

I am developing an app for windows phone. My question is how can I trigger an event after 2 seconds?

    Private Sub btn1_Click(sender As Object, e As RoutedEventArgs) Handles btn1.Click
    Dim input As String = txtinput.Text
    Dim last As Char = input(input.Length - 1)
    If last = "A" Then
        Dim final As String = input.Substring(0, input.Length - 1) & "B"c
        txtinput.Text = final.

      'start timer here
      'trigger an event after 2 seconds

    ElseIf last = "B" Then
        Dim final As String = input.Substring(0, input.Length - 1) & "C"c
        Dim tmr As TimeSpan = TimeSpan.FromSeconds(2)
        txtinput.Text = final

      'start timer here
      'trigger an event after 2 seconds


    Else
        txtinput.Text = input + "A"
    End If

 End Sub

I am using Visual Basic as my language in developing this. Any help would be much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T11:11:26+00:00Added an answer on June 14, 2026 at 11:11 am

    declare dispatcherTimer inside the class

    Dim WithEvents dt As System.Windows.Threading.DispatcherTimer
    

    then create instance of dispatcherTimer whereever you want, set time span

    dt = New System.Windows.Threading.DispatcherTimer()
    dt.Interval = New TimeSpan(0, 0, 0, 0, 500) '' 500 Milliseconds
    dt.Start()
    

    and here is your handler

    Private Sub dt_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles dt.Tick
        ' Do Stuff here.
    End Sub
    

    *converted code to VB from here, though I have not tested it..it may work for you..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a Windows Phone app where users can update a list. Each
I'm developing a Windows Phone app. I have the following C# code: private void
I'm developing a Windows Phone app that functions like the popular Logo Quiz in
I'm developing an HTML5 app for Android, iPhone and Windows phone and I'm using
I am developing a Windows Phone 7 App which is capable to work without
I'm developing my first windows phone 7 app, and I've hit a snag. basically
I'm developing a Windows Phone application . I have defined this on App.xaml: <nav:UriMapping
I am developing a map App in windows phone 7.5 platform. I need draw
I am developing an Hybrid Mobile app using Windows Phone 7 sdk and phonegap.
I am developing a windows phone app and am new in wp7 development. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.