using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Runtime.InteropServices;namespace WindowsFormsApplication1{ public partial class Form1 : Form { [DllImport("kernel32.dll")] static extern int Sleep(long dwMilliseconds); public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { lbltxt.Text = "calling windows API calls by interopservices...."; MessageBox.Show("start sleeping for 5000.................."); Sleep(1000); MessageBox.Show("end............."); } }}