Click here to Skip to main content
16,018,460 members

Comments by suhanaarora (Top 4 by date)

suhanaarora 21-Jul-13 10:42am View    
yeah it works fine now :).Thanks
suhanaarora 21-Jul-13 10:35am View    
Hi I wrote following code using timer but in this case Window1 appears after every 5 seconds because timer tick event is raised after every 5 seconds.How to limit this to only once

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Threading;

namespace UIPack
{
///
/// Interaction logic for MainWindow.xaml
///

public partial class MainWindow : Window
{

System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer();




public MainWindow()
{
InitializeComponent();
dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
dispatcherTimer.Interval = new TimeSpan(0, 0, 5);
dispatcherTimer.Start();


}

private void dispatcherTimer_Tick(object sender, EventArgs e)
{
Window1 w = new Window1();
this.Hide();
w.Show();

}
}
}
suhanaarora 21-Jul-13 9:43am View    
Thanks...I updated the question with the code
suhanaarora 4-Jun-13 7:29am View    
Because I heard dll works only if Sharepoint is installed and I do not want this dependency