Posts

Showing posts from November, 2012

How to work process Loder in windows c#

1.        Create   ModelLodingUI   Window Form and set the property : FromBoderStyle - None 2.        Drag & Drop Picture Box and set Loading Image. 3.        Paste following code: 4.   namespace LoadingProcess 5.   { 6.        public partial class ModalLoadingUI : Form 7.        { 8.            #region Constants 9.            public bool CloseMe = false ; 10.         #endregion 11.   12.         public ModalLoadingUI() 13.         { 14.             InitializeComponent(); 15.         } 16.  ...

How to export data in excel sheet

  public static void exportExcel(System.Data.DataTable dt, string fileName,string logoImagePath,string compName,string compDetails,string reportTitle)         {             // BackUp objBackUp = new BackUp();             /*              * un comment following code for password protected excel file              */             //Filename = AppDomain.CurrentDomain.BaseDirectory + fileName.Trim()+".xls";             Filename = fileName;             FileInfo f = new FileInfo(Filename);             if ...

How to work Background Worker

 BackgroundLoading.cs ---------------------------------------------------------- public class BackgroundLoading     {         public delegate void RunFunction();         public BackgroundWorker Bw;         public RunFunction thisFunction;         FrmLoding newLoading;         public BackgroundLoading(RunFunction newFunction)         {             try             {                 System.Threading.ThreadStart ts = new System.Threading.ThreadStart(ExpansiveMethod);                 System.Thre...