Friday, June 25, 2010

Splash window - dealing with opacity.

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;

 

namespace WindowsFormsApplication1

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

 

        private void Form1_Load(object sender, EventArgs e)

        {

            int Loop = 0;

 

            for (Loop = 500; Loop >= 5; Loop -= 10)

            {

                this.Opacity = Loop / 450.0;

                this.Refresh();

                System.Threading.Thread.Sleep(100);

            }

 

        }

    }

}

 

Thursday, June 24, 2010

Crystal Reports in C#.

A step by step tutorial for beginners who is creating their Crystal Reports for the first time in C#.

 

http://csharp.net-informations.com/crystal-reports/csharp-crystal-reports-stepbystep.htm

Monday, June 21, 2010

DOT NET Interview Questions.

 DOT NET Interview Questions.

By:- Shivprasad koirala

 

Download Link –

 

https://docs.google.com/fileview?id=0B1ZFICsuo2JFZTJiZjgyNWEtY2M0ZS00Mjg4LWIwOGEtMWUxZDM2YjI4OTlk&hl=en

 

Thursday, June 17, 2010

Monday, June 14, 2010

Converts an Excel serial date to DateTime.

      

Converts an Excel serial date to DateTime

 

 

 

       /// <summary>

       /// converts an Excel serial date to DateTime

       /// </summary>

       /// <param name="nSerialDate"></param>

       /// <returns></returns>

 

 

 static  DateTime ExcelSerialToDateTime(int nSerialDate)

        {

            return (new DateTime(1900, 1, 1)).AddDays(nSerialDate - 2);

        }

 

===Or====

 

        static  DateTime ExcelSerialDateToDT(int nSerialDate)

        {

            int l = nSerialDate + 68569 + 2415019;

            int n = ((4 * l) / 146097);

            l = l - ((146097 * n + 3) / 4);

            int i = ((4000 * (l + 1)) / 1461001);

            l = l - ((1461 * i) / 4) + 31;

            int j = ((80 * l) / 2447);

            int nDay = l - ((2447 * j) / 80);

            l = (j / 11);

            int nMonth = j + 2 - (12 * l);

            int nYear = 100 * (n - 49) + i + l;

 

 

            return DateTime.Parse(nMonth + "/" + nDay + "/" + nYear);

        }

Monday, May 17, 2010

IIS server - Version change

Suppose you are changing your website (asp.net) version to other then it is very necessary you have to add and allow that version in the web service extensions as below snap shot .


Code Formater

Paste Here Your Source Code
Source Code Formatting Options
1) Convert Tab into Space :
2) Need Line Code Numbering :
3) Remove blank lines :
4) Embeded styles / Stylesheet :
5) Code Block Width :
6) Code Block Height :
7) Alternative Background :
Copy Formatted Source Code
 
Preview Of Formatted Code